html div邊框陰影


1、div邊框陰影

 1 <style>
 2 div{ 
 3 -webkit-border-radius: 8px;
 4 -moz-border-radius: 8px;
 5 border-radius: 8px;
 6 -webkit-box-shadow: #ccc 0px 0px 10px;
 7 -moz-box-shadow: #ccc 0px 0px 10px;
 8 box-shadow: #ccc 0px 0px 10px;
 9 }
10 </style>

 

2、div里的img實現放大時候仍在div框里。

在img外再套一層div。position為relative。img標簽position為absolute。

<div style="width: 50%; float:right; height: 80%;">
<p style="font-weight:900; font-size: 18px;color: #333;">細節截圖:</p>

<div style="width:500px;height:30px;position:relative">
<img  class="big" style="width:500px;height:20px;position:absolute;top:0;left:0;" src=
"./pics/0.1.jpg" />
</div>

<br />
<div style="width:500px;height:30px;position:relative">
<img class="big" style="width:500px;height:20px;position:absolute;bottom:0;left:0;" src=
"./pics/0.2.jpg" />
</div>

</div>

上面的圖片top為0,放大時向下。下面的圖片bottom為0.貼着div的底部向上放大。

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM