标签:position opacity relative div hover meta 实战 src border
<!DOCTYPE html> <html> <head lang="en"> <meta charset="UTF-8"> <title></title> <style> /* .test { width: 150px; height: 300px; border: 1px solid #ccc; margin-top: 100px; float: left; margin-left: -1px; } .test:hover { border: 1px solid #f40; position: relative; } */ .test { width: 150px; height: 300px; border: 1px solid #ccc; margin-top: 100px; float: left; margin-left: -1px; position: relative; } .test:hover { border: 1px solid #f40; z-index: 1; } </style> </head> <body> <div class="test"></div> <div class="test"></div> <div class="test"></div> <div class="test"></div> <div class="test"></div> </body> </html>
CSS3
background: rgba(0,0,0,0.5);
opacity: 0.5; 让盒子半透明 里面的内容也半透明
标签:position opacity relative div hover meta 实战 src border
原文地址:https://www.cnblogs.com/lhh520/p/8961030.html