首页 > 解决方案 > 如何改变 UI 语义的高度

问题描述

我使用语义 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;

}

标签: cssreactjsuser-interfaceheightsemantic-ui

解决方案


您还需要设置 iframe 的高度,所以:

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

推荐阅读