gpt4 book ai didi

html - Css 内容被截断

转载 作者:太空宇宙 更新时间:2023-11-04 08:02:11 25 4
gpt4 key购买 nike

我的例子:https://jsfiddle.net/ymkokef5/

我的问题(X 似乎被切断了)- 如何将 X 定位在“框”内?

enter image description here

我正在使用 <button class="modal-close"></button>在我的演示网站上。

我想在左上角放置一个“X”(关闭)。

.modal-close {
position: absolute;
z-index: 9999;
overflow: hidden;
top: 28px;
left: 28px;
margin: 0;
padding: 0;
font-size: 40px;
line-height: 1;
width: 0.75em;
height: 0.75em;
cursor: pointer;
background: none;
border: 0;
color: #888888;
}

.modal-close::after {
content: "X";
}

.modal-close::after {
position: absolute;
top: -0.025em;
left: -0.1em;
padding: 0
}

.flexbox {
display: -webkit-box;
display: -ms-flexbox;
display: flex;
/* establish flex container */
-webkit-box-orient: vertical;
-webkit-box-direction: normal;
-ms-flex-direction: column;
flex-direction: column;
/* make main-axis vertical */
-webkit-box-pack: center;
-ms-flex-pack: center;
justify-content: center;
/* align items vertically, in this case */
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
/* align items horizontally, in this case */
height: 100%;
/* for demo purposes */
width: 100%;
}

#Kurzfilm video {
margin: 0 auto;
display: inline-block;
position: absolute;
}

#Kurzfilm .overlay {
background-color: #ffffff;
opacity: 1;
width: 100%;
height: 100%;
z-index: 80;
position: absolute;
top: 0;
left: 0;
}

#Kurzfilm video,
#modal .window {
z-index: 90;
}

#Kurzfilm {
position: absolute;
left: 0;
top: 0;
width: 100%;
height: 100%;
z-index: 90;
}

body,
html {
height: 100%;
margin: 0;
padding: 0;
font-family: Arial;
font-size: 1vw;
font-weight: normal;
color: #000000;
}
<div id="Kurzfilm">
<button class="modal-close"></button>
<div class="overlay"></div>
<div class="flexbox">
<video width="320" height="240">
<source src="https://www.w3schools.com/html/movie.mp4" type="video/mp4">
Your browser does not support the video tag.
</video>
</div>
</div>

最佳答案

.modal-close::after {
position: absolute;
top: 0em;
left: 0em;
padding: 0
}

使top和left = 0em,这将把它带到绝对 Angular 落

.modal-close {
position: absolute;
z-index: 9999;
overflow-x: visible;
top: 28px;
left: 28px;
margin: 0;
padding: 0;
font-size: 40px;
line-height: 1;
width: 0.75em;
height: 0.75em;
cursor: pointer;
background: none;
border: 0;
color: #888888;
}

使 overflow-x 可见以取消切割 X

关于html - Css 内容被截断,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46925113/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com