首页 > 代码库 > CSS3转换 | css遮罩
CSS3转换 | css遮罩
<!DOCTYPE> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=gb2312" /> <title>CSS3转换 | css遮罩</title> <script> function showDiv(){ document.getElementById(‘bg‘).style.display = ‘block‘; document.getElementById(‘show‘).style.display = ‘block‘; } function hidden1(){ document.getElementById(‘bg‘).style.display = ‘none‘; document.getElementById(‘show‘).style.display = ‘none‘; } </script> <style> #bg{ background-color:#000000; opacity:0.5; width:100%; height:100%; z-index:1000; position:absolute; top:0%; left:0%; display:none } #show{ background-color:white; width:500px; height:500px; z-index:1002; border:6px solid #E8E9F7; position:absolute; top:20%; left:20%; display:none; border-radius:25px;} #css3div{ opacity: 0.6; font-size:16px; color:#FFFFFF; border-radius:10px; border:5px solid #FFCC99; background-color:#66FF99; width:100px; height:50px; text-align:center; padding-top:30px; margin-left:40%; -webkit-transition: width 2s, height 2s, -webkit-transform 2s, opacity 1s, background 1s, font-size 1s; } #css3div:hover{ width:150px; height:70px; -webkit-transform:rotate(360deg); background-color:#6633FF; opacity: 1; font-size:20px; color:#FFFFFF; } </style> </head> <body> <input type="button" onClick="showDiv()" value="http://www.mamicode.com/show" /> <div id=‘bg‘></div> <div id="show"> <input type="button" onClick="hidden1()" value="http://www.mamicode.com/hidden" /> <h1 style="text-shadow: 5px 5px 5px #FF0000;">哈哈的厉害厉害</h1> <div id=‘css3div‘>CSS3效果</div> </div> </body> </html>
CSS3转换 | css遮罩
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。