html - 为什么我的链接样式表中的某些 CSS 格式未应用?
问题描述
我正在尝试使用 CSS 样式表在我的页面中添加一个 Youtube 视频到我的页面,由于某种原因,视频没有出现
.youtube-video iframe,
.youtube-video img,
.youtube-video-2 iframe,
.youtube-video-2 img {
position: absolute;
top: 0px;
left: 12%;
width: 890px;
height: 500px;
cursor: pointer;
}
img {
vertical-align: middle;
}
<img class=" ls-is-cached lazyloaded" data-src="https://supertasker.pk/images/youtube-video-1-min-new.png" alt="Youtube-vide" video-url="https://www.youtube.com/embed/-luUppOIWHA" src="https://supertasker.pk/images/youtube-video-1-min-new.png">
解决方案
.youtube-video iframe,
.youtube-video img,
.youtube-video-2 iframe,
.youtube-video-2 img {
position: absolute;
top: 0px;
left: 12%;
width: 890px;
height: 500px;
cursor: pointer;
}
img {
vertical-align: middle;
}
<iframe width="420" height="315" src="https://www.youtube.com/embed/tgbNymZ7vqY"></iframe>
现在将在此处运行,因为它已被此站点阻止。但你可以在这里检查它的工作: https ://www.w3schools.com/html/tryit.asp?filename=tryhtml_youtubeiframe
推荐阅读
- jquery - 在 BaguetteBox 中的每个图像下方添加按钮
- linux - Linux 容器上的 Kestrel 证书“无此类文件”适用于 Windows 容器
- javascript - 有条件地设置允许的 IsIn 装饰器可能性?
- docker - Zeppelin 无法在 docker 上加载:logErrors docker zeppelin
- python - 您如何编写几乎类型安全的代码,其中包含一个类中的对象列表?
- c++ - 无法从命令窗口运行可执行文件
- java - 获取特定列 JPA,Spring boot
- python - 如何从python中的嵌套字典中提取特定键的值并返回值列表
- python - 如何编写正则表达式从银行存折中提取帐号?
- ios - 来自 iOS 13 应用程序的 Xcode 内存图上约 500 个 NSZombie 警告