开发者

AJAX: is the new loaded content using the same css file?

开发者 https://www.devze.com 2023-01-02 17:21 出处:网络
When I load content with AJAX, is this content supposed to automatically use the preloaded main page css style ?

When I load content with AJAX, is this content supposed to automatically use the preloaded main page css style ?

For exam开发者_JS百科ple, if I load a <span class="smallText">hello</span> with AJAX.

Is this new HTML using the default.css file with

.smallText {
   font-size:6px;
}

?


when I load content with AJAX, is this content supposed to automatically use the preloaded main page css style ?

Yes. The HTML is injected into the context of the current page, and subject to all its CSS rules.


Yes it will use the CSS of the page it's loaded in.

0

精彩评论

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

关注公众号