简体   繁体   English

CSS 层 - z-index

[英]CSS layers - z-index

enter image description here I have added this check button into the card, and added position into it so I can put it in the corner on the left, but when I get the button out of the card corner I got disappear, even when I use z-index! enter image description here我已经将这个复选按钮添加到卡片中,并添加了 position 这样我就可以把它放在左边的角落里,但是当我把按钮从卡片角落里拿出来时我就消失了,即使我使用z-指数!

That's because you have overflow: hidden;那是因为你有overflow: hidden; set for the .note-card ..note-card设置。 If you want to keep it, you will have to move your check outside that container or switch to overflow: visible and deal with the cut-off text differently, either by making the box taller, shortening text, or wrapping that text in another div that then would have the overflow: hidden to just cut off the text.如果你想保留它,你将不得不将你的支票移到该容器之外或切换到overflow: visible并以不同方式处理截断文本,通过使框更高,缩短文本或将该文本包装在另一个div中那就会有overflow: hidden只是切断文本。

The button disappears because you have the overflow property set to hidden on the .note-card element.该按钮消失是因为您在.note-card元素上将overflow属性设置为hidden Try setting this property to visible .尝试将此属性设置为visible

Also providing a code snippet can allow others to help you in a better manner as screenshots of code are not that helpful.还提供代码片段可以让其他人以更好的方式帮助您,因为代码的屏幕截图没有多大帮助。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM