首页 > 解决方案 > 渐变背景正在切断 png 图像

问题描述

我无法为以下片段中描述的一个图像制作阴影渐变背景。我尝试了各种解决方案,但无法正常工作。图像从底部被切断。

.circle {      
  line-height: 0.33;
  border-radius: 100%;
  background: #fff;
  color: #FFF;
  box-shadow: 1px 5px 20px #adadad;
} 
<img class="circle" src="https://i.stack.imgur.com/4kEf0.png">  

标签: htmlcss

解决方案


请查看以下解决方案。我希望这有帮助。

.circle {
  display: inline-block;
  line-height: 0.33;
  border-radius: 100%;
  background: #fff;
  color: #FFF;
  box-shadow: 1px 5px 20px #adadad;
} 
<div class="circle"> 
  <img src="https://i.stack.imgur.com/4kEf0.png">  
</div>

请让我知道这可不可以帮你。


推荐阅读