Home > Web Front-end > JS Tutorial > jQuery method to add highlighting effect to website_jquery

jQuery method to add highlighting effect to website_jquery

WBOY
Release: 2016-05-16 15:52:31
Original
1359 people have browsed it

The example in this article describes how jQuery can add highlighting effects to websites. Share it with everyone for your reference. The details are as follows:

This jquery code demonstrates how to mask the entire page and highlight something

$(function() {
  var docHeight = $(document).height();
  $("body").append("<div id='overlay'></div>");
  $("#overlay")
   .height(docHeight)
   .css({
     'opacity' : 0.4,
     'position': 'absolute',
     'top': 0,
     'left': 0,
     'background-color': 'black',
     'width': '100%',
     'z-index': 5000
   });
});

Copy after login

I hope this article will be helpful to everyone’s jQuery programming.

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template