<<web>>漂亮的相册(一)

本文介绍了一个使用HTML和CSS实现的照片墙布局案例,其中照片框采用了倾斜显示的方式,并附带了简单的图片描述。布局通过浮动元素和变换效果实现,背景色为浅灰色。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

1,html

<!doctype html>
 <html>
  <head>
   <meta charset="utf-8">
   <link href="D:/test/css/css.css" rel="stylesheet" type="text/css">
   <title></title>
  </head>
 <body>
   <div class="polaroid rotate_left">

     <img src="D:/test/images/1.jpg" witdh="300px" height="300px"/>
   <p class="caption">wallence</p>
   </div>
   <div class="polaroid rotate_right">
      <img src="D:/test/images/2.jpg" witdh="300px" height="300px"/>
      <p class="caption">wallence</p>
   </div>
   <div class="polaroid rotate_left">
    <img src="D:/test/images/3.jpg" witdh="300px" height="300px"/>
      <p class="caption">wallence</p>
   </div>
   <div class="polaroid rotate_right">
    <img src="D:/test/images/4.jpg" witdh="300px" height="300px"/>
      <p class="caption">wallence</p>
   </div>

 </body>
</html>

2,css

body{
    margin:30px;
    background-color: #e9e9e9;
}
div.polaroid
{
width:310px;
padding:10px 10px 20px 10px;
border:4px solid #BFBFBF;
background-color:white;
/* Add box-shadow */
box-shadow:10px 30px 10px #aaaaaa;
}
div.rotate_left{
float:left;
transform:rotate(7deg);
-ms-transform:rotate(7deg); /* IE 9 */
}
div.rotate_right{
float:left;
transform:rotate(-8deg);
-ms-transform:rotate(-8deg); /* IE 9 */
}
caption{
    float:right;
}

3,js

标签名字,真的可以理解为一个标签,它可以给多个不同对象统一个标签,然后通过标签控制对象
一个对象也可以多个标签,不同标签属性分别设置,总的来说,标签就是一个别名

这里写图片描述

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值