Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
363 views
in Technique[技术] by (71.8m points)

html - Override property in "style=" attribute?

I am trying to adjust the position of the background image of a button in CKEditor.

CKEditor hard-codes button images with background-position: 0px 0pt. I don't want to change this, as it seems to be in the editor's core.

I can, however, set a custom class for the button and style that in the style sheet. But because the background-position statement is made in the style attribute, I can't overwrite it from a class, not even using !important.

Is there any way to override a CSS property in the style= attribute in a CSS class?

I don't think there is. Anybody know any workarounds?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

The only way to override the properties specified in a style attribute is to use !important.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...