witam, nie działa mi transition, najeżdżam myszką i nic.., oto kod:
html:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="stylesheet" href="styles.css">
<title>Shopping Cart</title>
</head>
<body>
<header>
<div class='overlay'></div>
<nav>
<h2>SHOP</h2>
<ul>
<li><a href="index.html">Home</a></li>
<li><a href="#">About</a></li>
<li class='cart'>
<a href="cart.html">
<ion-icon name='basket'></ion-icon>Cart<span>0</span>
</a>
</li>
</ul>
</nav>
</header>
<div class='container'>
<div class='image'>
<img src="images/championWoBlack.jpg" alt="strongman">
<h3>1</h3>
<h3>%15,00</h3>
<a class='add-cart cart1' href="#">Add Cart</a>
</div>
<div class='image'>
<img src="images/championWoBlack.jpg" alt="strongman">
<h3>2</h3>
<h3>%15,00</h3>
<a class='add-cart cart2' href="#">Add Cart</a>
</div>
<div class='image'>
<img src="images/championWoBlack.jpg" alt="strongman">
<h3>3</h3>
<h3>%15,00</h3>
<a class='add-cart cart3' href="#">Add Cart</a>
</div>
<div class='image'>
<img src="images/championWoBlack.jpg" alt="strongman">
<h3>4</h3>
<h3>%15,00</h3>
<a class='add-cart cart4' href="#">Add Cart</a>
</div>
</div>
<script src="https://unpkg.com/[email protected]/dist/ionicons.js"></script>
</body>
</html>
css:
* {
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: 'Manrope', sans-serif;
}
header {
background-image: url('images/cover.jpg');
background-repeat: no-repeat;
background-size: cover;
background-position: center;
height: 150px;
position: relative;
}
.overlay {
position: absolute;
z-index: 1;
top: 0;
left: 0;
height: 100%;
right: 0;
padding: 0 !important;
bottom: 0;
margin: 0 !important;
background-color: rgba(10,10,10,0.3);
}
nav {
position: absolute;
top: 0;
right: 0;
left: 0;
z-index: 2;
display: flex;
flex-wrap: wrap;
justify-content: space-between;
padding: 50px 60px 0 60px;
}
nav li {
list-style: none;
display: inline-block;
padding-right: 10px;
padding-left: 10px;
}
nav li span {
padding-left: 5px;
}
li a {
padding: 5px;
background-color: #fff;
text-decoration: none;
}
.cart ion-icon {
vertical-align: bottom;
font-size: 20px;
padding-right: 5px;
}
.cart a {
background-color: royalblue;
color: #fff;
cursor: pointer;
text-decoration: none;
}
.container {
display: flex;
flex-wrap: wrap;
justify-content: center;
margin-top: 50px;
padding-bottom: 100px;
}
.image {
margin-right: 20px;
margin-left: 20px;
position: relative;
overflow: hidden;
}
.add-cart {
position: absolute;
width: 100%;
background-color: darkgrey;
transition: all 0.3s ease-in-out;
opacity: 0;
cursor: pointer;
text-align: center;
}
.image:hover .cart1,
.image:hover .cart2,
.image:hover .cart3,
.image:hover .cart4 {
bottom: 50x;
opacity: 1;
padding: 10px;
text-decoration: none;
}