开发者

change the scrollbar style of iframe only

开发者 https://www.devze.com 2023-04-06 05:41 出处:网络
I want to change the style of scrollbars of iframe only, not the style of scrollbars of window. I\'ve seen the style of webkit and body css, but these change the style of window scrollbars. Is th开发者

I want to change the style of scrollbars of iframe only, not the style of scrollbars of window. I've seen the style of webkit and body css, but these change the style of window scrollbars. Is th开发者_Python百科ere any possible way to have different scrollbar in iframe than the parent window.


What Pekka commented is accurate. However, some browsers actually "creates" the scrollbars in the page where you have the iframe in, so there you need to use an ID for the iframe, and set the styles like:

iframe#id_name { style information }

However, most browsers let the scrollbars be created by the page you are iframing, in which case you need to specify the CSS styles for them within that page, like Pekka said.

It's all about which page is responsible for "making" the scrollbars when they are needed.

Hopefully that helps.

0

精彩评论

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

关注公众号