Card awaiting content
How do I make an card awaiting content?
What is a card awaiting content? How do you make a card awaiting content? This script and codes were developed by Kenan Yusuf on 06 December 2022, Tuesday.
Card awaiting content - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Card awaiting content</title> <link href='https://fonts.googleapis.com/css?family=Alegreya+Sans:300,400|Source+Sans+Pro:400,300' rel='stylesheet' type='text/css'> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/5.0.0/normalize.min.css"> <link rel="stylesheet" href="css/style.css">
</head>
<body>
<div class="card"> <div class="card__image"><img class="js-image" alt=""/></div> <div class="card__content"> <h1 class="card__heading js-heading"></h1> <p class="card__paragraph js-paragraph"></p> </div>
</div>
<div class="button-group"> <button class="button js-toggle">Toggle content</button>
</div> <script src="js/index.js"></script>
</body>
</html>
Card awaiting content - Script Codes CSS Codes
* { box-sizing: border-box;
}
html,
body { height: 100%;
}
body { display: flex; flex-direction: column; flex-wrap: wrap; justify-content: center; align-items: center; width: 100%; height: 100%; background: #e6e6e6; font-family: 'Source Sans Pro', sans-serif;
}
.card { width: 100%; max-width: 300px; min-height: 400px; margin: 10px; background: #fff; border-bottom: 1px solid #d8d8d8; box-shadow: 0 1px 4px 0 rgba(0,0,0,0.1);
}
.card__image { position: relative; width: 100%; height: 0; padding-bottom: 60%; background: #d7692c; overflow: hidden;
}
.card__image:after { content: ''; position: absolute; width: 100%; height: 100%; background: linear-gradient(90deg, rgba(0,0,0,0), rgba(255,255,255,0.15), rgba(0,0,0,0)); transform: translateX(-100%); animation: loading 1.5s infinite;
}
.card__image img { position: relative; max-width: 100%; z-index: 1;
}
.card__content { padding: 20px;
}
.card__heading { margin-top: 0; margin-bottom: 10px; font-family: 'Alegreya Sans', sans-serif; font-weight: 400;
}
.card__heading:empty { width: 100%; height: 35px; background: #d8d8d8; margin-bottom: 20px;
}
.card__paragraph { margin: 0; font-size: 20px; line-height: 1.35;
}
.card__paragraph:empty { width: 90%; height: 20px; background: #d8d8d8;
}
.button { margin: 10px; padding: 15px 20px; background: #2aa1c0; border: 0; color: #fff;
}
.button:hover { background: #0e647d;
}
@-moz-keyframes loading { 100% { transform: translateX(100%); }
}
@-webkit-keyframes loading { 100% { transform: translateX(100%); }
}
@-o-keyframes loading { 100% { transform: translateX(100%); }
}
@keyframes loading { 100% { transform: translateX(100%); }
}
Card awaiting content - Script Codes JS Codes
'use strict';
var toggle = document.querySelector('.js-toggle'), image = document.querySelector('.js-image'), heading = document.querySelector('.js-heading'), paragraph = document.querySelector('.js-paragraph');
var content = false;
toggle.addEventListener('click', function () { if (content === false) { content = true; image.src = 'http://unsplash.it/400/400?image=564'; heading.innerHTML = 'Some heading'; paragraph.innerHTML = 'Lorem ipsum dolor sit amet, consectetur adipisicing elit. Culpa rerum porro aut laboriosam animi.'; } else { content = false; image.src = ''; heading.innerHTML = ''; paragraph.innerHTML = ''; }
});
Developer | Kenan Yusuf |
Username | KenanYusuf |
Uploaded | December 06, 2022 |
Rating | 4.5 |
Size | 4,012 Kb |
Views | 8,096 |
Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!
Name | Size |
Kyusuf.com layout | 3,467 Kb |
Scalable Text Stylus Mixin | 2,421 Kb |
Styling visited links | 2,799 Kb |
Styling unvisited links | 2,816 Kb |
Material Weather Widget with Moment.js | 5,929 Kb |
EU Referendum Ballot Paper | 4,023 Kb |
Scrollable Navigation | 3,141 Kb |
Expanding box and fading content | 3,418 Kb |
Page layout experiment | 5,391 Kb |
Slick carousel with detached captions | 3,150 Kb |
Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!
Name | Username | Size |
Drifting Clouds | Benedikte | 2,247 Kb |
Toolbar | Onsen | 5,414 Kb |
Wrap_Test | Mscfourn | 7,503 Kb |
Tumblr API | Juanv911 | 2,436 Kb |
CSS3 Fullscreen Background Slideshow | Leetech | 3,435 Kb |
AngularJS Datalist Directive | M-e-conroy | 2,366 Kb |
Bootstrap 3 Price Table | Honglio | 2,655 Kb |
Slider | Mohammed-fawzy | 2,634 Kb |
CSS3 Animated buttons | Cguillou | 3,737 Kb |
Parallax-ish Sliding Content | Jdsteinbach | 2,748 Kb |
Surf anonymously, prevent hackers from acquiring your IP address, send anonymous email, and encrypt your Internet connection. High speed, ultra secure, and easy to use. Instant setup. Hide Your IP Now!