【发布时间】:2021-01-18 12:20:22
【问题描述】:
我使用语义 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 {height:500px}
-
<div className="video_box ui embed"> <iframe width="100%" height="500px" ></iframe> </div>
标签: css reactjs user-interface height semantic-ui