Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Fotorama jQuery插件
在这个插件中,我使用透明的 PNG 图像。我需要为图像设置背景颜色。我尝试设置样式,但没有成功。
<div class="fotorama"> <img style="background-color: #ffff00" src="/slider/image1.png"> <img style="background-color: #ffff00" src="/slider/image1.png"> </div>
.fotorama__wrap--slide .fotorama__stage__frame { opacity: 1 !important; background-color: #FF0; }
在 CSS 中找到此类,并添加您的 bg-color 规则...顺便说一句,您可以使用 firefox、chrome 中的开发人员工具,即...(F12 将打开它)并检查元素。这样,您可以轻松检查/调试 html/css/js... 注意:这是最新版本 fotorama 的解决方案,不确定以前版本中的类名是否相同...