我正在尝试更改Wordpress主题Make中的页面构建器横幅(滑块)高度。 它会让我改变滑块的宽度,但由于某种原因,高度会被冻结。下面的代码是我改变宽度的地方,我会假设高度也要改变?
.builder-banner-slide {
position: relative;
z-index: 1;
width: 100%;
height: 0;
background-repeat: no-repeat;
background-position: center center;
background-size: cover; }
答案 0 :(得分:0)
尝试覆盖先前定义的高度属性值,如下所示。
height: 0!important; /* Adjust as needed */
overflow: hidden!important; /* Hide whatever part that goes beyond the given height */
您的代码现在将如下所示
.builder-banner-slide {
position: relative;
z-index: 1;
width: 100%;
height: 0!important; /* Adjust as needed */
overflow: hidden!important; /* Hide whatever part that goes beyond the given height */
background-repeat: no-repeat;
background-position: center center;
background-size: cover; }
注意:如果上述操作不成功,请检查您是否拥有包含元素的正确ID或类。