簡單練手 使用css樣式製作電子相簿

來源:互聯網
上載者:User

先貼上原始碼

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>電子相簿</title>
<style type="text/css">
div{
width:800px;
height:700px;
background-color:beige;
margin:40px auto;
position:relative;
list-style:none;
}
a:hover img{
position:absolute;
display:block;
overflow:hidden;


}
a:hover img{
top:100px;
left:180px;
width:600px;
height:500px;
}
a{
width:110px;
height:80px;
border-color:beige;
display:block;
overflow:hidden;
}
</style>
</head>


<body>
    <div id="div1">
    <ul>
    <br />
    <a><img src="1.jpg" /></a><br />
    <a><img src="2.jpg" /></a><br />
    <a><img src="3.jpg" /></a><br />
    <a><img src="6.jpg" /></a><br />
    <a><img src="4.jpg" /></a><br />
    <a><img src="6.jpg" /></a><br />
    </ul>
    </div>
</body>
</html>

圖片選擇的是幾張阿狸的,簡單截屏吧

相關文章

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.