html - 渐变背景正在切断 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">
解决方案
请查看以下解决方案。我希望这有帮助。
.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>
请让我知道这可不可以帮你。
推荐阅读
- python - 如何使用 Python 处理字典中的特定元素
- apache-kafka - kafka SASL/SCRAM 身份验证失败
- windows - 使用 PowerShell Direct 重新启动服务器计算机并恢复脚本
- javascript - 我有与按钮相同类的框。单击按钮时,应将文本框添加到相应的框中
- html - 是否可以创建一个始终将用户带到其国家/地区网站的链接?
- vba - 操作 TextRange 时 Mac 与 Windows 的差异与行/段落
- laravel - niklasravnsborg / laravel-pdf 中的波斯数字
- python - 我无法将 bs4 输出导出到文件
- python - 从 c++ 中使用 cppyy 读取 char16_t* 字符串
- python - 类方法局部变量可以修改类变量吗?