AJAX: is the new loaded content using the same css file?
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.
精彩评论