CSSStyleDeclaration getPropertyPriority() method

Definition and Usage

getPropertyPriority() The method returns whether the specified CSS attribute has "important!" priority setting.

If this method returns "important!", the important qualifier is set.

If this method returns an empty string, the important qualifier is not set.

example

return whether the color attribute has "important!" priority setting:

var declaration = document.styleSheets[0].cssRules[0].style;
var priority = declaration.getPropertyPriority("color");
alert(priority);

try it personally

grammar

object.getPropertyPriority(Περιγραφή.getPropertyPriority(

)

) Παράμετροι
Περιγραφή propertyname

Απαιτείται. Σtring, που δείχνει το όνομα της ιδιότητας που θα ελεγχθεί.

Τεχνικά λεπτομέρειες Έκδοση DOM:
CSS Object Model Αποτελεσματική τιμή:

Συμβολοσειρά που δείχνει την προτεραιότητα, αν δεν υπάρχει είναι κενή συμβολοσειρά.

Υποστήριξη περιηγητών Chrome Edge Firefox Safari
Υποστήριξη περιηγητών Chrome Edge Firefox Safari
9.0 Opera 9.0 9.0 9.0