why does the linear gradient do have slides when the direction is set top/bottom ? if i set it to right or left it doesn't show slides .. should i set the width to 100% ? or make it auto .. the problem here is that when i tried to use the "deg" instead of using to bottom the code didn't run
here is the codepen
<body>
<header>
<div class="header-logo">ON ANIME</div>
<div class="header-links">
<ul>
<li><a href="#">url</a></li>
<li><a href="#">url</a></li>
<li><a href="#">url</a></li>
</ul>
</div>
<div class="search-bar"><button>Buy now</button></div>
</header>
<div class="container">
<div class="item">
<img src="https://fr.techtribune.net/wp-content/uploads/2021/01/boruto-chapter-55.jpg"/>
<span class="caption">Text below the image</span>
</div>
</div>
<script src="" async defer></script>
</body>
* {
outline: 0px;
box-sizing: border-box;
position: relative;
padding: 0;
margin: 0;
}
body {
/* background-image:
url('https://www.teahub.io/photos/full/34-345522_all-anime-characters-wallpaper-hd.jpg');
background-size: cover; */
/* background-image:
linear-gradient(-90deg, rgba(
145, 146, 122, 0.62), rgba(
217, 91, 132, 0.58)), url(
'https://www.teahub.io/photos/full/34-345522_all-anime-characters-wallpaper-hd.jpg'); */
background: linear-gradient(to bottom, rgba(0, 0, 255, 0.548), rgba(255, 192, 203, 0.555)),
url(https://www.teahub.io/photos/full/34-345522_all-anime-characters-wallpaper-hd.jpg)
;
background-size: cover;
}
header {
display: flex;
justify-content: space-between;
align-items: center;
background-color: rgb(22, 22, 48);
width: 100%;
height: 65px;
z-index: 9999;
box-shadow: 0 0 20px #00000094;
}
.header-links ul li a {
text-decoration: none;
}
.header-links ul li {
display: inline;
margin-right: 50px;
}
.header-logo {
padding: 20px;
margin-left: 50px;
}
.search-bar {
padding: 20px;
margin-right: 50px;
}
.container {
width: 93%;
max-width: 1600px;
margin: 0 auto;
background-color: rgba(77, 77, 201, 0.781);
}
div.item {
vertical-align: top;
display: inline-block;
text-align: center;
width: 270px;
margin: 0 12px 30px;
box-shadow: 0 0 16px black;
transition: transform .5s ease;
}
img {
padding: 0;
display: block;
width: 100%;
height: 100%;
border-top-left-radius: 3%;
border-top-right-radius: 3%;
}
.caption {
padding: 0;
display: block;
background-color: #232223;
}
div.item:hover {
transform: scale(1.05);
}