【问题标题】:HTML and SASS are linked together yet they don't function normallyHTML 和 SASS 链接在一起,但它们无法正常运行
【发布时间】:2020-11-28 07:31:48
【问题描述】:

这是我的 HTML 文件的 Div 代码 -

<section id="top-sale">
                <div class="container py-5">
                    <h4 class="font-rubik font-size-20">Top Sale</h4>
                    <hr>
                    <!-- Owl Carousel -->
                        <div class="owl-carousel owl-theme">
                            <div class="item py-2">
                                <div class="product font-rale"><a href="#"> <img src="./assets/products/s10.png" alt="product1" class="img-fluid"></a>
                                    <div class="text-center">
                                        <h6>Samsung Galaxy S10</h6>
                                        <div class="rating text-warning font-size-12">
                                            <span><i class="fas fa-star"></i></span>
                                            <span><i class="fas fa-star"></i></span>
                                            <span><i class="fas fa-star"></i></span>
                                            <span><i class="fas fa-star"></i></span>
                                            <span><i class="far fa-star"></i></span>                                            
                                        </div>
                                        <div class="price py-2">
                                            <span>₹14200</span>
                                        </div>
                                        <button type="submit" class="btn btn-warning font-size-12">Add to Cart</button>
                                    </div>                 
                                </div>
                            </div>
</section>

这是我的 SASS 文件的代码 -

>#top-sale{
    .owl-carousel .item .product a{
        overflow: hidden;
    }

    .owl-carousel .item .product img{
        transition: transform .5s ease;
    }

    .owl-carousel .item .product img:hover{
        transform: scale(1.1);
    } }

我的 VSCode 无法检测到“img:hover”,并且它根本无法运行。有什么办法可以解决?

【问题讨论】:

    标签: html css sass responsive-design frontend


    【解决方案1】:

    它对我有用,虽然我删除了

    &gt;

    之前的字符

    &gt;#top-sale

    你可以在这里查看:https://codepen.io/shoowack/pen/ExKgVJW

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2023-04-02
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多