Beruflich Dokumente
Kultur Dokumente
<html>
<head>
<style>
.container {
position: relative;
width: 50%;
.image {
display: block;
width: 100%;
height: auto;
.overlay {
position: absolute;
bottom: 0;
left: 100%;
right: 0;
background-color: #008CBA;
overflow: hidden;
width: 0;
height: 100%;
}
.container:hover .overlay {
width: 100%;
left: 0;
.text {
white-space: nowrap;
color: white;
font-size: 20px;
position: absolute;
overflow: hidden;
top: 50%;
left: 50%;
</style>
</head>
<body>
<div class="container">
<div class="overlay">
</div>
</div>
</body>
</html>
Modal Image
<!DOCTYPE html>
<html>
<head>
<style>
.modal {
left: 0;
top: 0;
/* Modal Content */
.modal-content {
position: relative;
background-color: #fefefe;
margin: auto;
padding: 0;
width: 80%;
-webkit-animation-name: animatetop;
-webkit-animation-duration: 0.4s;
animation-name: animatetop;
animation-duration: 0.4s
/* Add Animation */
@-webkit-keyframes animatetop {
to {top:0; opacity:1}
}
@keyframes animatetop {
to {top:0; opacity:1}
.close {
color: white;
float: right;
font-size: 28px;
font-weight: bold;
.close:hover,
.close:focus {
color: #000;
text-decoration: none;
cursor: pointer;
.modal-header {
padding: 2px 16px;
background-color: #5cb85c;
color: white;
.modal-footer {
background-color: #5cb85c;
color: white;
</style>
</head>
<body>
<div class="modal-content">
<div class="modal-header">
<span class="close">×</span>
<h2>Modal Header</h2>
</div>
<div class="modal-body">
</div>
<div class="modal-footer">
<h3>Modal Footer</h3>
</div>
</div>
</div>
<script>
btn.onclick = function() {
modal.style.display = "block";
span.onclick = function() {
modal.style.display = "none";
window.onclick = function(event) {
if (event.target == modal) {
modal.style.display = "none";
}
}
</script>
</body>
</html>
Hero Image
<!DOCTYPE html>
<html>
<head>
<style>
body, html {
height: 100%;
margin: 0;
.hero-image {
background-image: url("photographer.jpg");
height: 50%;
background-position: center;
background-repeat: no-repeat;
background-size: cover;
position: relative;
.hero-text {
text-align: center;
position: absolute;
top: 50%;
left: 50%;
color: white;
.hero-text button {
border: none;
outline: 0;
display: inline-block;
color: black;
background-color: #ddd;
text-align: center;
cursor: pointer;
.hero-text button:hover {
background-color: #555;
color: white;
</style>
</head>
<body>
<div class="hero-image">
<div class="hero-text">
<button>Hire me</button>
</div>
</div>
<p>Page Content..</p>
</body>
</html>
<html>
<head>
<style>
img:hover {
animation-iteration-count: infinite;
@keyframes shake {
</style>
</head>
<body>
</body>
</html>
Image Filters
Note: The filter property is not supported in Internet Explorer, Edge 12, or Safari 5.1
and earlier.
<!DOCTYPE html>
<html>
<head>
<style>
img {
filter: grayscale(100%);
</style>
</head>
<body>
<p><strong>Note:</strong> The filter property is not supported in Internet Explorer, Edge 12, or Safari 5.1 and
earlier.</p>
</body>
</html>
BLUR Image
<!DOCTYPE html>
<html>
<head>
<style>
img {
filter: blur(5px);
</style>
</head>
<body>
<p><strong>Note:</strong> The filter property is not supported in Internet Explorer, Edge 12, or Safari 5.1 and
earlier.</p>
</body>
</html>
<html>
<head>
<style>
body {
.sidenav {
height: 100%;
width: 0;
position: fixed;
z-index: 1;
top: 0;
left: 0;
background-color: #111;
overflow-x: hidden;
transition: 0.5s;
padding-top: 60px;
.sidenav a {
text-decoration: none;
font-size: 25px;
color: #818181;
display: block;
transition: 0.3s;
.sidenav a:hover {
color: #f1f1f1;
.sidenav .closebtn {
position: absolute;
top: 0;
right: 25px;
font-size: 36px;
margin-left: 50px;
</style>
</head>
<body>
<a href="#">About</a>
<a href="#">Services</a>
<a href="#">Clients</a>
<a href="#">Contact</a>
</div>
<script>
function openNav() {
document.getElementById("mySidenav").style.width = "250px";
}
function closeNav() {
document.getElementById("mySidenav").style.width = "0";
</script>
</body>
</html>
Accordion
<!DOCTYPE html>
<html>
<head>
<style>
.accordion {
background-color: #eee;
color: #444;
cursor: pointer;
padding: 18px;
width: 100%;
border: none;
text-align: left;
outline: none;
font-size: 15px;
transition: 0.4s;
.active, .accordion:hover {
background-color: #ccc;
}
.panel {
padding: 0 18px;
display: none;
background-color: white;
</style>
</head>
<body>
<h2>Accordion</h2>
<div class="panel">
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore
magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
consequat.</p>
</div>
<div class="panel">
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore
magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
consequat.</p>
</div>
<div class="panel">
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore
magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
consequat.</p>
</div>
<script>
var acc = document.getElementsByClassName("accordion");
var i;
acc[i].onclick = function(){
this.classList.toggle("active");
panel.style.display = "none";
} else {
panel.style.display = "block";
</script>
</body>
</html>