开发者

Javascript and CSS FOUC prevention interfering print stylesheet

开发者 https://www.devze.com 2023-02-14 09:30 出处:网络
I\'m using a simple technique to prevent FOUC on my page. I have a \"feedback\" sliding button on my page that\'s initially set with display:none in my stylesheet. Later, when JS is loaded and the sli

I'm using a simple technique to prevent FOUC on my page. I have a "feedback" sliding button on my page that's initially set with display:none in my stylesheet. Later, when JS is loaded and the sliding code is loaded, i apply .css('display', 'block') with jQuery. That works perfectly.

However, when someone prints the page, my sliding button and it's content are shown in the print ver开发者_StackOverflowsion, even though i'm declaring display:none for the DIV inside the print.css. How can i fix this?


Maybe use:

display: none !important;

in your print style.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号