图片过度与变形的综合运用

2、图片的主网页

<!DOCTYPE html>
<html>
 <head>
  <meta charset="UTF-8">
  <title>我的图片</title>
 <link rel="stylesheet" type="text/css" href="css/第七周作业样式表.css">
 </head>
 <body>
  <div class="box">
  <div class="p">
  shape
  <div class="b">
   <img src="img/头像1.jpg" alt="" />
  </div>
  </div>
  <div class="p">
  displacement
  <div class="b">
  <img src="img/头像4.jpg" alt="" />
  </div>
  </div>
  <div class="p">
  position
  <div class="b">
   <img src="img/头像3.jpg" alt="" />
   </div>
  </div>
  <div class="p">
  color
  <div class="b">
   <img src="img/头像2.jpg" alt="" />
   </div>
  </div>
  </div>
 </body>
 </body>
</html>

2、图片的一些样式

.box{
   width:800px;
   height:250px;
   background-color:#000000;
   margin:100px auto;
  }
  .box .p{
   width:150px;
   height: 150px;
   margin-left: 30px;
   margin-top: 30px;
   font-size:12px;
   color:hotpink;
   text-align: center;
   float:left;
  }
  .box .p .b{
   width:150px;
   height: 150px;
   margin-top: 10px;
   border:5px solid black;
   border-radius:5px;
  }
  .box .p .b img{
   width:150px;
   height:150px;
  }
  .box .p:nth-child(1) .b:hover{
   border-radius:30%;
  }
  .box .p .b{
   width:150px;
   height: 150px;
   margin-top: 10px;
   border:5px solid white;
   border-radius:5px;
   transition:all 0.5s;
  }
  .box .p .b img{
   width:150px;
   height: 150px;
   transition: all 0.5s;
  }
  .box .p:nth-child(2) .b img:hover{
   transform: scale(2);
  }
  .box .p .b{
   width:150px;
   height: 150px;
   margin-top: 10px;
   border:5px solid black;
   border-radius:5px;
   transition:all 0.5s;
   overflow: hidden;
  }
  .box .p:nth-child(3) .b:hover{
   transform:rotate(30deg);
  }
  .box .p:nth-child(4) .b img:hover{
   filter:grayscale(100%)
  }
  .box .p .b:hover{
   box-shadow:0px 0px 40px plum;
  }

3、效果图
1.1原图在这里插入图片描述
1.2形状
在这里插入图片描述
1.3放大
在这里插入图片描述
1.4 旋转
在这里插入图片描述
1.5 阴影
在这里插入图片描述

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值