Blogger Information
Blog 55
fans 0
comment 0
visits 59002
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
给边框加颜色
南鸢离梦的博客
Original
937 people have browsed it
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <title>\</title>
  5. </head>
  6. <style type="text/css">
  7. .info{
  8. width: 296px;
  9. height: 180px;
  10. margin: 20px auto;
  11. position: relative; /*父相*/
  12. }
  13. .info:hover::before{ /*鼠标经过之后 前面插入一个伪元素*/
  14. content: '';
  15. width: 100%;
  16. height: 100%;
  17. border: 10px solid rgba(201, 255, 209, 0.4);
  18. display: block; /*转换块级元素 伪元素属于行内元素*/
  19. position: absolute; /*要伪元素不占位,就用绝对定位*/ /*子绝父相*/
  20. top: 0;
  21. left: 0;
  22. box-sizing: border-box; /*把加入border padding 都算在宽里面*/
  23. }
  24. </style>
  25. <body>
  26. <div>
  27. <img src="../images/SuCai/RLs.jpg" height="180" width="296"/>
  28. </div>
  29. <div>
  30. <img src="../images/SuCai/RLs.jpg" height="180" width="296"/>
  31. </div>
  32. <div>
  33. <img src="../images/SuCai/RLs.jpg" height="180" width="296" class="info" />
  34. </div>
  35. </body>
  36. </html>
Statement of this Website
The copyright of this blog article belongs to the blogger. Please specify the address when reprinting! If there is any infringement or violation of the law, please contact admin@php.cn Report processing!
All comments Speak rationally on civilized internet, please comply with News Comment Service Agreement
0 comments
Author's latest blog post