我正在尝试使用CSS实现以下的下拉阴影效果:
我尝试用线性渐变作为背景图片来设计一个 <hr>
元素的样式,作为在图像上使用 box -shadow
规则的替代方法,但它并不能产生所需的曲线阴影效果。
我尝试的这个目标可以只通过 CSS 实现吗?
以下是我的当前代码:
HTML
<section class="section-categories section-fruits">
<div class="row">
<figure class="categories">
<img src="res/img/category/fruits.png" alt="Offers" class="categories__fruits">
</figure>
<div class="categories__explore">
<p>Fruits & Vegetables</p>
<p>A variety of fresh fresh and vegetables</p>
<button>Explore fruit and veg</button>
</div>
</div>
</section>
CSS
/* Using Box Shadow, but didn't get the desired effect */
.section-categories{
height: 250px;
margin: 20px 0px;
box-shadow: 0px 1px 1px rgba(0,0,0,0.3);
}