Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- div.features {
- display: flex;
- flex-wrap: wrap;
- gap: 10px;
- width: calc(100% - 100px);
- margin: 0px auto;
- max-width: 2000px;
- justify-content: space-between;
- }
- div.features .feature {
- flex: 0 1 calc(12.5% - 11.25px);
- box-sizing: border-box;
- }
- div.feature {
- width: 100%;
- height: 400px;
- margin-bottom: 40px;
- background-color: var(--stroke);
- border-radius:var(--radius);
- box-shadow: 0 4px 8px 0 #000;
- display: inline-block;
- overflow: hidden;
- position: relative;
- animation: FadeIn 1s ease;
- }
- div.feature img {
- position: relative;
- float: left;
- width: 100%;
- height: 100%;
- object-fit: cover;
- object-position: center;
- transition: .2s ease;
- filter:brightness(0.35);
- }
- div.feature:hover img {
- transform: scale(1.3);
- filter:brightness(0.5);
- transition: .2s ease;
- }
- div.features:hover {
- animation-play-state: paused;
- }
- div.feature div.info {
- text-align: left;
- background: linear-gradient(110deg, rgba(254,65,224,0.5) 0%, rgba(224,56,221,0) 65%);
- background-position: -100px 0px;
- background-repeat: no-repeat;
- height: 100%;
- width: calc(100% - 40px);
- position: absolute;
- display: block;
- top: 0px;
- padding: 20px;
- transition: .5s ease;
- }
- div.feature div.info h1 {
- margin: 2px;
- transition: .5s ease;
- overflow: hidden;
- text-overflow: ellipsis;
- }
- div.feature div.info p {
- font-size: 1.1em;
- opacity: 0.5;
- transform: translateX(0);
- transition: .5s ease;
- max-width: 300px;
- overflow: hidden;
- text-overflow: ellipsis;
- }
- div.feature:hover div.info p {
- opacity: 1;
- transform: translateX(5px);
- transition: .5s ease;
- }
- div.feature:hover div.info h1 {
- transform: translateX(2px);
- transition: .5s ease;
- }
- div.feature div.info:hover {
- background-position: 0px 0px;
- transition: .8s ease;
- }
- .scroll-wrapper {
- overflow: hidden;
- width: 100%;
- padding: 40px 0;
- position: relative;
- }
- .features {
- display: flex;
- flex-wrap: nowrap;
- gap: 30px;
- width: max-content;
- animation: scroll-horizontal 60s linear infinite;
- }
- @keyframes scroll-horizontal {
- 0% {
- transform: translateX(0);
- }
- 100% {
- transform: translateX(-50%);
- }
- }
- .feature {
- flex: 0 0 400px;
- }
Advertisement
Add Comment
Please, Sign In to add comment