javascript - 为什么我不能从 cloudinary 调整我的图像大小
问题描述
这是我的图像的 CSS 代码(它保持原始大小从 cloudinary)
.img-container {
position: relative;
width: 150px;
height: 150px;
border-radius: 50%;
margin: 0 auto;
margin-bottom: 1.5rem;
}
#skills-img {
height: 100%;
width: 100%;
display: block;
object-fit: contain;
border-radius: 50%;
position: relative;
}
我的图像 HTML
<div class="img-container">
<img src="" id="skills-image" alt="Skill">
</div>
关于为什么它不会让我调整云图像大小的任何想法?
TIA康纳
解决方案
看起来像一个错字:CSS
是 for #skills-img
,HTML 中的图像 id 是skills-image
.img-container {
position: relative;
width: 150px;
height: 150px;
border-radius: 50%;
margin: 0 auto;
margin-bottom: 1.5rem;
}
#skills-img {
height: 100%;
width: 100%;
display: block;
object-fit: contain;
border-radius: 50%;
position: relative;
}
<div class="img-container">
<img src="" id="skills-img" alt="Skill">
</div>
我希望你得到你的解决方案。
推荐阅读
- perl - Perl:如何在两个相同模式之间打印线条?
- javascript - typeorm 高效批量更新
- c++ - 如何将 Crypto++ 用于 ECIES 并检索公共秘密、身份验证标签和密文
- python - Kivy 无法使用 ScreenManager 获取文本输入
- javascript - 当我通过 jQuery 从外部更新输入字段时,jsRender 对象未更新(在旧版本中工作)
- python - Python Groupby 和计数
- php - PHP函数确定日期是否是一个月的最后一个工作日(周一至周五)
- ios - RuntimeError - 无法找到带有标识符的订阅:当 ios 应用程序尝试发送消息时
- tekton - Tekton 管道 - 显示在仪表板上的秘密
- python - 在对 pandas 数据框的列表进行迭代时使用错误 re.findall()