javascript高手们,请帮我看一道面试题,自己不知从何下手。。。

qq_29448025 2017-03-24 11:04:14
...全文
108 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
当作看不见 2017-03-24
  • 打赏
  • 举报
回复

<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8" />
        <title>new_file</title>
    </head>
    <style type="text/css">
        *{
            margin: 0;
            padding: 0;
        }
        @keyframes aroundLine{
            0%{left:0px;}
            45%{left: 100%;}
        }
        div{
            position: relative;
            height: 50px;
            width: 50px;
            left: 0;
            top: 0;
            border-radius: 25px;
            background-color: aquamarine;
            animation: aroundLine 5s infinite;
        }
 
    </style>
    <body>
        <div></div>
        <hr />
    </body>
</html>
似梦飞花 2017-03-24
  • 打赏
  • 举报
回复

<!DOCTYPE html>
<html>
<head>
    <title></title>
    <style>
        @-webkit-keyframes move{
            0%{
                transform:translate(0,0);
            }
            100%{
                transform:translate(200px,0);
            }
        }
        div{
            background-color: #ff0000;
            width: 20px;
            height: 20px;
            border-radius: 50%;
            animation:move 2s linear 0s infinite alternate;
        }
    </style>
</head>
<body>
<div></div>
</body>
</html>
cn00439805 2017-03-24
  • 打赏
  • 举报
回复

<style>
	#a{width:20px;height:20px;background:#f60;border-radius:20px;-webkit-animation:gogogo 2s infinite alternate linear;}
	@-webkit-keyframes gogogo {
		0%{
			-webkit-transform:translateX(0);
		
		}
		100%{
			-webkit-transform:translateX(100px);
		}
	}
</style>
<div id="a"></div>

87,994

社区成员

发帖
与我相关
我的任务
社区描述
Web 开发 JavaScript
社区管理员
  • JavaScript
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧