您好,欢迎访问一九零五行业门户网

CSS3如何实现自定义“W”形运行轨迹

本篇文章主要介绍了css3效果:“w”形运行轨迹实例,可以通过css实现w的运行轨迹,非常具有实用价值,需要的朋友可以参考下。
整理文档,搜刮出一个css3效果:“w”形运行轨迹实例的代码,稍微整理精简一下做下分享。
<!doctype html><html><head lang="en">    <meta charset="utf-8">    <title></title>    <style type="text/css">        *{            margin: 0;            padding:0;        }        #p{            width:900px;            height:400px;            border:2px solid black;            margin: 100px auto;        }        #span{            float:left;            display: block;            font-size: 100px;            width: 100px;            height: 100px;            line-height: 80px;            text-align: center;            border-radius: 50%;            background: radial-gradient(blue,green);            animation: move 4s ease 0s infinite alternate;        }        @keyframes move {            0%{                transform: translate(0px,0px);            }            25%{                transform: translate(200px,300px);            }            50%{                transform: translate(400px,0px);            }            75%{                transform: translate(600px,300px);            }            100%{                transform: translate(800px,0px);            }        }    </style></head><body><p id="p">    <span id="span">w</span></p></body></html>
以上就是本文的全部内容,希望对大家的学习有所帮助,更多相关内容请关注!
相关推荐:
如何对未知高度的图片设置垂直居中
以上就是css3如何实现自定义“w”形运行轨迹的详细内容。
其它类似信息

推荐信息