.video-container {
position: relative;
width: 100%;
padding-top: 56.25%;
background: #000;
}
.video-container iframe,
.video-container video {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
border: none;
border-radius: 12px; /* ✅ 加这一行即可,控制圆角 */
}
(function () {
function embedVideo(container) {
if (!container) return;
const videoUrl = container.getAttribute('data-url');
if (!videoUrl) {
container.innerHTML = '无效视频链接';
return ...
.video-container {
position: relative;
width: 100%;
padding-top: 56.25%; /* 16:9 宽高比 */
background: #000;
border-radius: 12px;
overflow: hidden;
}
.video-container iframe,
.video-container video {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
border: none;
}
.video-container .error-message {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
color: #fff;
text-align: center;
}
(function () {
function embedVideo( ...
Welcome to Hexo! This is your very first post. Check documentation for more info. If you get any problems when using Hexo, you can find the answer in troubleshooting or you can ask me on GitHub.
Quick StartCreate a new post1$ hexo new "My New Post"
More info: Writing
Run server1$ hexo server
More info: Server
Generate static files1$ hexo generate
More info: Generating
Deploy to remote sites1$ hexo deploy
More info: Deployment
配置主题与主站配置文件,到这一步主题部署就完成了12345678//本地预览hexo cl; hexo s//其 ...
.video-container {
position: relative;
width: 100%;
padding-top: 56.25%;
background: #000;
}
.video-container iframe,
.video-container video {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
border: none;
}
(function () {
function embedVideo(container) {
if (!container) return;
const videoUrl = container.getAttribute('data-url');
if (!videoUrl) {
container.innerHTML = '无效视频链接';
return;
}
container.innerHTML = ''; // 清空 ...

