如何改变UI语义的高度



我使用Semantic UI并嵌入到视频的iFrame标签中。但是我想改变语义UI的高度。

<div className="video_box ui embed">
<iframe
width="100%"
height="100%"
src="https://www.youtube.com/embed/tkLLGHa8XuI?start=23"
frameborder="0"
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
allowfullscreen
></iframe>
</div>
这是我的CSS文件。我想改变这里的高度
video_box {
display: flex;
width: 50%;
height: 500px; /*This is not working*/
margin-right: 10px;
align-items: center;

}

您还需要设置iframe的高度,因此:

.iframe, .video_box {
height: 500px;
};

检查这个:

.video_box {
display: flex;
width: 50%;
height: 500px;
margin-right: 10px;
align-items: center;
}
iframe {
height:500px
}
<div className="video_box ui embed">
<iframe
width="100%"
height="100%"
src="https://www.youtube.com/embed/tkLLGHa8XuI?start=23"
frameborder="0"
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
allowfullscreen
></iframe>
</div>

最新更新