diedVIPs

html knowhow

Rahmen der rotiert










Rotierender Rahmen

Der Rahmen bewegt sich automatisch ums Bild.

So sieht´s aus



Quellcode
<html>
<head>

<style type="text/css">
.bb::before, .bb::after, .bb {
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
}
.bb {
width: 200px;
height: 200px;
margin: auto;
background: url("../bilder/Andie MacDowell.jpg") no-repeat 50%/70% rgba(0, 0, 0, 0.1);
color: #69ca62;
box-shadow: inset 0 0 0 1px rgba(red, 0.5);
}
.bb::before, .bb::after {
content: "";
z-index: -10;
margin: -5%;
box-shadow: inset 0 0 0 10px;
animation: clipMe 8s linear infinite;
}
.bb::before {
animation-delay: -4s;
}
.bb:hover::after, .bb:hover::before {
background-color: rgba(255, 0, 0, 0.3);
}
@keyframes clipMe {
0%, 100% {
clip: rect(0px, 220px, 2px, 0px);
}
25% {
clip: rect(0px, 2px, 220px, 0px);
}
50% {
clip: rect(218px, 220px, 220px, 0px);
}
75% {
clip: rect(0px, 220px, 220px, 218px);
}
}
html,
body {
height: 100%;
}
body {
position: relative;
background-color: #0f222b;
}
*,
*::before,
*::after {
box-sizing: border-box;
}
<head>

<body >
<div class="bb"></div>
</body>

</html>










Kontakt    Datenschutz    Impressum