Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/86.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Jquery 使整个页面变暗,但突出显示某些区域_Jquery_Html_Css - Fatal编程技术网

Jquery 使整个页面变暗,但突出显示某些区域

Jquery 使整个页面变暗,但突出显示某些区域,jquery,html,css,Jquery,Html,Css,演示 如何在前面突出显示 <body> <p>bla bla</p> <p class="light">hightlihgt this</p> </body> 您可以使用顶部带有弹出式元素的覆盖元素: div#overlay{ width:100%; height:100%; position:fixed; top:0; left:0; background-color:rgba(0

演示

如何在前面突出显示

<body>
    <p>bla bla</p>
    <p class="light">hightlihgt this</p>
</body>

您可以使用顶部带有弹出式元素的覆盖元素:

div#overlay{
  width:100%;
  height:100%;
  position:fixed;
  top:0;
  left:0;
  background-color:rgba(0,0,0,0.6);
  z-index:999;
}
div#popup{
  width:300px;
  height:200px;
  position:fixed;
  left:50%;
  margin-left:-150px;
  top:50%;
  margin-top:-100px;
  background-color:#fff;
  z-index:1000;
}

为什么要问两次同样的问题,用同样的拼写“hightlihgt”。。。
div#overlay{
  width:100%;
  height:100%;
  position:fixed;
  top:0;
  left:0;
  background-color:rgba(0,0,0,0.6);
  z-index:999;
}
div#popup{
  width:300px;
  height:200px;
  position:fixed;
  left:50%;
  margin-left:-150px;
  top:50%;
  margin-top:-100px;
  background-color:#fff;
  z-index:1000;
}