国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 開發 > CSS > 正文

CSS3簡單實現照片墻

2024-07-11 08:30:17
字體:
來源:轉載
供稿:網友

HTML


復制代碼
代碼如下:
<body>
<h2>照片墻制作</h2>
<div class="container">
<img class="img1" src="img/img (1).jpg" height="150" width="150" alt="">
<img class="img2" src="img/img (2).jpg" height="160" width="200" alt="">
<img class="img3" src="img/img (3).jpg" height="170" width="200" alt="">
<img class="img4" src="img/img (4).jpg" height="240" width="200" alt="">
<img class="img5" src="img/img (5).jpg" height="300" width="300" alt="">
</div>
</body>

CSS(此處省略了瀏覽器私有屬性前綴!)


復制代碼
代碼如下:
<style>
* {margin:0; padding:0;}
body { background-color: #eee; padding-top: 50px;}
h2 { text-align: center;}
.container { position: relative; width:1000px; height:700px; margin:0px auto; }
img { position: absolute; top:50px; left:100px; cursor: pointer;
padding:10px 10px 25px; background-color: #fff; border:1px solid #ddd;
transition:0.5s; box-shadow: 3px 3px 3px #ccc;
}
.img1 { left:40px; top:20px; transform:rotate(30deg); z-index: 1;}
.img2 { left:156px; top:156px; transform:rotate(-30deg); z-index: 1;}
.img3 { left:381px; top:60px; transform:rotate(30deg); z-index: 1;}
.img4 { left:458px; top:256px; transform:rotate(30deg); z-index: 1;}
.img5 { left:684px; top:110px; transform:rotate(-40deg); z-index: 1;}
img:hover { transform:rotate(0deg); transform:scale(1.5); box-shadow: 6px 6px 6px #656565; z-index: 2;}
</style>

效果圖:

發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 吴忠市| 阿合奇县| 射阳县| 西城区| 彭泽县| 弋阳县| 慈溪市| 建湖县| 郯城县| 上思县| 临沭县| 巴林右旗| 项城市| 蒙阴县| 甘南县| 司法| 中方县| 山东省| 和政县| 永济市| 元江| 综艺| 当雄县| 诸暨市| 桓仁| 清镇市| 泰和县| 饶阳县| 台州市| 泸水县| 柳河县| 城步| 同德县| 姚安县| 沁水县| 沅陵县| 苍梧县| 永寿县| 天峻县| 比如县| 江达县|