您的位置:首页 > Web前端 > HTML

HTML实现图片的定向移动

2017-01-04 15:34 246 查看
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<title>无标题文档</title>

<style>
.l1{  overflow:hidden; }
.l1>ul{ list-style:none;}
.l1>ul>li{ overflow:hidden;width:300px; height:371px; float:left; }
.l1 img{transition:0.5s;}
.l1 img:hover{ margin-left:-10px;}

</style>

</head>

<body>
<div class="l1">

    <ul>

            <li>

                    <img src="images/test.jpg" alt="" width="650" height="371" />

                    </li>

             </ul>

   

    </div>

</body>

</html>
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: