按钮调低整个页面? [英] Button to darken the whole page?
本文介绍了按钮调低整个页面?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我做的CSS和HTML网站(OFC有JS,jQuery和XML,但我们坚持的一点)我想打一个按钮什么用< UL>
和<立GT;
变暗网页,我发现这一点,code:
I'm making a website in CSS and HTML (ofc there's JS, jQuery and XML but let's stick to the point) I want to make a button whats using <ul>
and <li>
to darken the webpage, I found this, code:
#dimmer
{
background:#000;
opacity:0.5;
position:fixed; /*enter code here important to use fixed, not absolute */
top:0;
left:0;
width:100%;
height:100%;
display:none;
z-index:9999; /* may not be necessary */
}
你知道如何使CSS菜单按钮,使用 DIV
里面的本身,有人吗?
推荐答案
下面是在$演示C $ CPEN证明调光效果和按钮:的 HTTP://$c$cpen.io/srig99/full/pDzgj 。作为user1618143建议,jQuery将很容易让你在你的网站上实现这一目标。我已经在演示使用jQuery的为好。
Here's a demo on CodePen to demonstrate the dimming effect and button: http://codepen.io/srig99/full/pDzgj. As user1618143 suggested, jQuery will make it easy for you to achieve this in your website. I have utilized jQuery in the demo as well.
这篇关于按钮调低整个页面?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文