简体   繁体   English

如何从各个页面删除轮播

[英]How I can remove Carousel from individual pages

I put a carousel in master.blade.php and now I do not know how to remove it from some specific pages. 我在master.blade.php中放入了一个轮播,现在我不知道如何从某些特定页面上将其删除。

When I try with this code in my custom.css 当我在custom.css中尝试此代码时

#myCarousel {display: none;}

This code remove my carousel from all pages but I need from specific pages. 这段代码从所有页面上删除了我的轮播,但我需要从特定页面上删除。

How I can do that? 我该怎么做?

if you want to remove spesific class or id from spesific page, you can use parent class or id name for it. 如果要从特殊页面中删除特殊类或ID,则可以为其使用父类或ID名称。

for example in a.html page 例如在a.html页面中

<div class="parentClass">
     <div id="myCarousel"></div>
</div> 

and in b.html page 并在b.html页面中

<div class="parenClassTwo">
     <div id="myCarousel"></div>
</div> 

and you want to remove myCarousel from b.html page 并且您想要从b.html页面中删除myCarousel

then you can use this method 那么你可以使用这种方法

.parentClassTwo > #myCarousel {display: none;}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM