Jump to content

Проблема z-index и opasity

Recommended Posts


Подскажите как можно справиться с такой проблемой:

<div class="test"></div>
.test {
	position: relative;
	height: 10px;
  	width: 10px;
  	background: #353535;
  	opacity: 0;
  	transition: all 3s linear;
.test::before {
	content: "";
  	position: absolute;
	height: 10px;
  	width: 10px;
  	background: #595959;
  	z-index: -1;

И если мы присвоим блоку "test" "opacity: 1;" во время анимации наш "::before" будет отображаться поверх нашего блока "test". Скажите есть возможность отображения этого "::before" как задумывалось?

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...