[英]Is there any way to blur all page and focus certain div with jquery/javascript?
Is there any way to blur all page (for example set new background and give it to the foreground with z-index) and focus certain div (let's say error message) with jquery/javascript? 有没有办法模糊所有页面(例如设置新背景并使用z-index将其赋予前景)并使用jquery / javascript聚焦某些div(假设错误消息)? Do you know any plugin for that purpose?
你知道任何插件用于那个目的吗?
That's what I wanna get: 这就是我想得到的:
You can use the jQuery UI dialog and use CSS to change the overlay div background with a blur background image, like here: 您可以使用jQuery UI对话框并使用CSS来更改带有模糊背景图像的叠加div背景,如下所示:
http://css-tricks.com/examples/BlurryBackgroundEffect/ http://css-tricks.com/examples/BlurryBackgroundEffect/
--or-- - 要么 -
You can use the jQuery UI dialog mixed with the CSS Text blur effect found here: 您可以使用jQuery UI对话框与此处的CSS Text blur效果混合使用:
http://motyar.blogspot.com/2010/04/blur-effect-with-css-and-jquery.html http://motyar.blogspot.com/2010/04/blur-effect-with-css-and-jquery.html
However, I assume this will NOT be backwards compatible with non-html5 browsers. 但是,我认为这不会向后兼容非html5浏览器。
Here's a JS fiddle for proof of concept: http://jsfiddle.net/khalifah/vgGtK/ 这是一个JS小提琴,用于概念验证: http : //jsfiddle.net/khalifah/vgGtK/
Here's one with the style I think you want: http://jsfiddle.net/khalifah/7L5jG/ 这是我认为你想要的风格: http : //jsfiddle.net/khalifah/7L5jG/
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.