我想删除
#TB_window {
position: fixed;
background: #fff; <== THIS
z-index: 100050;
visibility: hidden;
text-align: left;
top: 50%;
left: 50%;
-webkit-box-shadow: 0 3px 6px rgba( 0, 0, 0, 0.3 );
box-shadow: 0 3px 6px rgba( 0, 0, 0, 0.3 );
}
所以我把它复制到我的.css并设置背景:透明; !重要
但它不是压倒一切。 我还想删除#TB_overlay上的背景... 这里有一个技巧,因为它还有class =&#34; TB_overlayBG&#34;所以
#TB_overlay.TB_overlayBG {
background-color: transparent; !important
}
我无法编辑thickbox.css,因为在更新Wordpress时它会被覆盖。
我有一个插件,它使用自定义帖子类型的帖子模板中的thickbox,如下所示:
<a href="<?php the_permalink(); ?>?TB_iframe=true&width=790&height=578" class="thickbox">
<?php the_post_thumbnail( 'medium-thumb' , array('class' => 'product-image') ); ?>
</a>
当我点击此图片时,我会在帖子的厚盒中找到一个iframe。 我有一个.css加载插件,如下所示:
wp_register_style( 'catalogue-style', plugins_url( 'product-catalogue' ) . '/css/catalogue-style.css' );
wp_enqueue_style( 'catalogue-style' );
所以我的catalog-style.css是页面源代码中的第一个。 thickbox.css在页脚后链接!
答案 0 :(得分:1)
尝试改为覆盖它:
#TB-window {
background:transparent;
}
背景是许多背景属性的简写,包括背景色和背景色。背景颜色不接受值none。根据规范,它接受以下值:<color>
|透明的|继承。
Background-image确实接受none作为属性,因此如果你想要覆盖的background属性中有一个图像,你可以传入none。
但是,如果将no传递给带有颜色集的background属性,则继承只接管并假设您希望颜色为#fff且图像值为none。有意义吗?
答案 1 :(得分:1)
如果有人遇到同样的问题,请尝试:
div#TB_window {background:none;box-shadow:none;}