changed a defined value inside the element

时间:2015-07-31 20:01:44

标签: javascript html css wordpress

I'm trying to change the defines css inside the div element of embed videos example this is the embed codes for poster

<div class="vjs-poster" tabindex="-1" 
style="background-image: url(streaming-auto-generated-poster.jpg);"></div>

I tried this code but it won't change the background since the default background are defined inside the div

.vjs-poster{
background-image:url(the post thumbnail);
}

what I want is to customized the background-image with my own

1 个答案:

答案 0 :(得分:1)

CSS will use the most specific rule when multiple are applicable, and by default style will trump a class definition. You can use !important to override this.

.vjs-poster {
  background-image: url(my-own-poster) !important;
}

More information here.