【发布时间】:2020-09-03 06:13:42
【问题描述】:
由于某种原因,视频显示在 Safari 中,但当我在 Chrome 中打开时却没有?不知道是我设置错了还是别的什么?我附上了用 chrome 打开时的屏幕截图。
.main-container {
position: relative;
width: 100%;
height: 100%;
}
.top-row {
width: 90%;
height: 70%;
margin-top: 150px;
position: absolute;
left: 50%;
transform: translateX(-50%);
}
.thumbnail {
display: inline;
margin-left: 10px;
margin-right: 10px;
position: relative;
}
.thumbnail img {
width: 18em;
height: 11em
}
<div class="main-container">
<div class="top-row">
<div class="thumbnail">
<img src="aminanew.mp4">
<p>Amina</p>
</div>
<div class="thumbnail">
<img src="connienew.mp4">
<p>Connie</p>
</div>
<div class="thumbnail">
<img src="rocionew.mp4">
<p>Rocio</p>
</div>
<div class="thumbnail">
<img src="kimnew.mp4">
<p>Kim</p>
</div>
</div>
</div>
【问题讨论】:
-
你确定你给图片的路径正确吗? mp4 不是图像格式吗?放一个 png 或 jpg 并尝试它是否有效。对于放置视频,也许您可以使用 html 视频标签
-
抱歉,我的意思是视频, 不能与视频一起使用吗?是的,路径应该是正确的!
-
它只适用于 Safari 浏览器预览。你可以试试html视频标签,看看它是否有效
-
@Rocio 你确定它在 Safari 中工作吗?使用
img标签?
标签: html css image google-chrome