前端开发用CSS3实现锯齿形边框

游戏编程开发是前端还是后端
游戏开发属于前端
前端游戏开发的背景

代码片段 1

<!DOCTYPE html>
    <head>
        <meta charset=”utf-8″ />
        <title>Javascript Test</title>
        <style>
            html,
            body {
                width: 100%;
                height: 100%;
                padding: 0;
                margin: 0;
            }
            .bg {
                width: 100%;
                height: 100%;
                background: #caca8c;
                background-image: -webkit-gradient(
                        linear,
                        50% 0,
                        0 100%,
                        from(transparent),
                        color-stop(0.5, transparent),
                        color-stop(0.5, #d86707),
                        to(#d86707)
                    ),
                    -webkit-gradient(linear, 50% 0, 100% 100%, from(transparent), color-stop(0.5, transparent), color-stop(0.5, #d86707), to(#d86707));
                background-image: -moz-linear-gradient(
                        50% 0 -45deg,
                        transparent,
                        transparent 50%,
                        #d86707 50%,
                        #ccc
                    ),
                    -moz-linear-gradient(50% 0 -135deg, transparent, transparent
                                50%, #d86707 50%, #d86707);
                background-size: 30px 15px;
                background-repeat: repeat-x;
                background-position: 0 100%;
            }
        </style>
    </head>
    <body>
        <div class=”bg”></div>
    </body>
</html>
前端转游戏开发
前端 打地鼠小游戏开发
游戏前端开发技能
» 本文来自:前端开发者 » 《前端开发用CSS3实现锯齿形边框》
» 本文链接地址:https://www.rokub.com/7587.html
» 您也可以订阅本站:https://www.rokub.com
赞(0)
64K

评论 抢沙发

评论前必须登录!