How to change the h3
font-style
to italic
on only one page, using CSS and not creating classes?
2 answers
This is how you can do it.
<h3 style="font-style: italic!important;">Текст</h3>
But at the same time, in the main css should not be in h3! Important
- Why should not? - Qwertiy ♦
- If basically it is! Important, then the rule of the main css will act. I mean, inside h3 is not the main rule. - Arcadiy
- oneinline important will kill anything jsfiddle.net/uqppL5tb - Qwertiy ♦
- I do not always work, why I did not understand, I have to excel. Well, in general, I gave the answer to the TSU, whether it will try it or not, the case is purely his personal, but it should work in my opinion. - Arcadiy
|
Not that this is impossible at all, but the support is bad:
@document /* Правила для конкретной страницы */ url(http://example.com/), /* Правила для страницы, URL которой начинается с ... */ url-prefix(http://example.com/snippets/), /* Правила для страниц определенного домена */ domain(example.com), /* Правила для всех https страниц */ regexp("https:.*") { /* Сами стили */ h3 { font-style: italic; } }
CSS at-rule that limits the effect of styles within itself based on the URL of the document.
Warning: this is an experimental technology!
Full support only using the -moz
prefix in Firefox older than version 6.0.
|
if (location.href== '/mypage') { //заголовок.стиль = italic }
- Jean-Claudeheader + .main > h3
- lexxl