So I want to make a radar like a sonar. So I will get a variable from an MQTT subscription. So on this radar, if it outputs 180 degrees and 50 on the distance I want it to be there on the radar. Also when the sweep has registered 180 degrees and 50 on the distance I want for example a red dot to pop up and then when the sweep passed it will fade away and then maybe pop up somewhere else if the variable has changed. How will I be able to do this and what language do I need to use. Like this one but I want the red dots on it that is controlled by MQTT variables. This is the code for the radar and the sweep.
html {
padding: 0;
margin: 0;
--green: rgb(40, 133, 40);
--size: 500px;
}
body {
background: #232;
display: flex;
align-items: center;
justify-content: center;
height: 100vh;
}
.container {
width: var(--size);
height: var(--size);
position: relative;
user-select: none;
}
.status {
font-family: "Lucida Sans Unicode", "Lucida Grande", "Lucida Sans", Arial,
sans-serif;
font-size: 10px;
font-weight: 400;
letter-spacing: 2px;
text-align: center;
padding: 7px 9px 7px 32px;
color: #777;
position: absolute;
bottom: 7%;
left: -5%;
box-shadow: 0 1px 2px 1px rgba(0, 0, 0, 0.6);
border-radius: 8px 0 0 8px;
}
.status::before,
.status::after {
content: "";
position: absolute;
left: 10px;
top: 50%;
transform: translateY(-50%);
width: 10px;
height: 10px;
border-radius: 50%;
border: 1px solid #333;
background: #181818;
}
.status::after {
background: radial-gradient(var(--green) 60%, darkgreen 40%);
animation: light 1.2s infinite alternate
cubic-bezier(0.785, 0.135, 0.15, 0.86);
border-color: transparent;
box-shadow: 0 0 5px 1px var(--green);
}
#keyframes light {
from {
opacity: 0;
}
to {
opacity: 1;
}
}
.container::after {
content: "";
width: 120%;
height: 100%;
left: -10%;
background: linear-gradient(45deg, #222, #333);
position: absolute;
z-index: -1;
box-shadow: 1px 2px 2px 2px #111;
border-radius: 4%;
}
.circle {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
border: 2px solid darkgreen;
border-radius: 50%;
width: 60%;
height: 60%;
will-change: transform;
}
#keyframes scan {
from {
transform: rotate(0deg);
}
to {
transform: rotate(360deg);
}
}
.circle-huge {
width: calc(var(--size) * 0.9);
height: calc(var(--size) * 0.9);
border: 4px solid var(--green);
--gradient: black 0%, black 12.35%, var(--green) 12.35%, var(--green) 12.55%,
black 12.56%;
background: repeating-linear-gradient(var(--gradient)),
repeating-linear-gradient(to right, var(--gradient)),
radial-gradient(black 33%, var(--green));
background-blend-mode: screen;
box-shadow: 0 1px 0 4px #222, 0 3px 0 5px #343;
}
.circle-huge::before {
background: linear-gradient(var(--green) 50%, black 50%),
linear-gradient(90deg, black 50%, var(--green) 50%);
background-blend-mode: darken;
position: absolute;
width: 100%;
height: 100%;
content: "";
border-radius: 50%;
will-change: opacity;
animation: scan 5s linear infinite;
opacity: 0.4;
}
.circle-big {
--this-size: calc(var(--size) * 0.7);
width: var(--this-size);
height: var(--this-size);
}
.circle-medium {
--this-size: calc(var(--size) * 0.5);
width: var(--this-size);
height: var(--this-size);
}
.circle-small {
--this-size: calc(var(--size) * 0.3);
width: var(--this-size);
height: var(--this-size);
}
.circle-tiny {
--this-size: calc(var(--size) * 0.15);
width: var(--this-size);
height: var(--this-size);
}
.circle-center {
width: 5%;
height: 5%;
border-color: firebrick;
background: firebrick;
}
.logo {
position: absolute;
top: 24px;
right: -16px;
font-family: Arial, Helvetica, sans-serif;
text-shadow: -1px 0 1px #111;
text-align: center;
}
.logo-first {
font-size: 19px;
letter-spacing: 2px;
color: #666;
border: 1px solid #383838;
border-radius: 4px;
padding: 3px 5px 1px;
}
.logo-second {
letter-spacing: 3px;
font-size: 14px;
color: #555;
margin-top: 2px;
}
.screw {
width: 12px;
height: 12px;
background: #444;
position: absolute;
top: 15px;
left: -35px;
border-radius: 50%;
box-shadow: 0 1px 0 1px #222;
}
.screw:after {
content: "";
width: 2px;
height: 10px;
position: absolute;
top: 1px;
left: 50%;
transform: translateX(-50%) rotate(35deg);
background: #333;
}
.screw:nth-of-type(even):after {
transform: translateX(-50%) rotate(105deg);
}
.screw:nth-of-type(n + 4):after {
transform: translateX(-50%) rotate(80deg);
}
.screw-1 {
left: initial;
right: -35px;
}
.screw-2 {
top: initial;
left: -35px;
bottom: 15px;
}
.screw-3 {
left: initial;
top: initial;
right: -35px;
bottom: 15px;
}
<!DOCTYPE html>
<html lang="en" >
<head>
<meta charset="UTF-8">
<title>CodePen - Military Radar System</title>
<link rel="stylesheet" href="./style.css">
</head>
<body>
<!-- partial:index.partial.html -->
<div class="container">
<div class="screw"></div>
<div class="screw screw-1"></div>
<div class="screw screw-2"></div>
<div class="screw screw-3"></div>
<div class="logo">
<div class="logo-first">RADAR</div>
<div class="logo-second">SYSTEM</div>
</div>
<div class="circle circle-huge">
<div class="circle circle-big">
<div class="circle circle-medium">
<div class="circle circle-small">
<div class="circle circle-tiny">
<div class="circle circle-center"></div>
</div>
</div>
</div>
</div>
</div>
<div class="status">SCANNING</div>
</div>
<!-- partial -->
<script src="./script.js"></script>
</body>
</html>
Related
This question already has answers here:
Footer at bottom of page or content, whichever is lower
(5 answers)
Closed 11 months ago.
I have a HTML. And i want to add the Footer to it but it is not aligning to it's bottom.
#import url(https://fonts.googleapis.com/css?family=Gudea:400,700);
#import url(https://fonts.googleapis.com/css2?family=Poppins:wght#200;300;400;500;600;700&display=swap);
#import url(https://fonts.googleapis.com/css2?family=Poppins:wght#100;200;300;400;500;600;700;800;900&display=swap);
#import url(https://fonts.googleapis.com/css2?family=Balsamiq+Sans:wght#400;700&family=Mochiy+Pop+P+One&display=swap);
:root {
--dark-one: #333;
--dark-two: #7a7a7a;
--main-color: #784cfb;
--light-one: #fff;
--light-two: #f9fafb;
--light-three: #f6f7fb;
--color_one: #ee1d52;
--color_two: #69c9d0;
--color_three: rgba(2, 0, 36, 1);
--gradient: linear-gradient(90deg, var(--color_three) 0%, var(--color_one) 35%, var(--color_three) 100%)
}
body {
perspective: 800px;
height: 100vh;
margin: 0;
overflow: hidden;
font-family: "Gudea", sans-serif;
background: #ea5c54;
background: -moz-linear-gradient(-45deg, #ea5c54 0%, #bb6dec 100%);
background: -webkit-gradient(linear, left top, right bottom, color-stop(0%, #ea5c54), color-stop(100%, #bb6dec));
background: -webkit-linear-gradient(-45deg, #ea5c54 0%, #bb6dec 100%);
background: -o-linear-gradient(-45deg, #ea5c54 0%, #bb6dec 100%);
background: -ms-linear-gradient(-45deg, #ea5c54 0%, #bb6dec 100%);
background: linear-gradient(135deg, #ea5c54 0%, #bb6dec 100%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#EA5C54 ', endColorstr='#bb6dec', GradientType=1);
}
body ::-webkit-input-placeholder {
color: #4e546d
}
body .authent {
display: none;
background: #35394a;
background: -moz-linear-gradient(45deg, #35394a 0%, #1f222e 100%);
background: -webkit-gradient(linear, left bottom, right top, color-stop(0%, #35394a), color-stop(100%, #1f222e));
background: -webkit-linear-gradient(45deg, #35394a 0%, #1f222e 100%);
background: -o-linear-gradient(45deg, #35394a 0%, #1f222e 100%);
background: -ms-linear-gradient(45deg, #35394a 0%, #1f222e 100%);
background: linear-gradient(45deg, #35394a 0%, #1f222e 100%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#35394a', endColorstr='#1f222e', GradientType=1);
position: absolute;
left: 0;
right: 90px;
margin: auto;
width: 100px;
color: white;
text-transform: uppercase;
letter-spacing: 1px;
text-align: center;
padding: 20px 70px;
top: 200px;
bottom: 0;
height: 70px;
opacity: 0
}
body .authent p {
text-align: center;
color: white
}
body .success {
display: none;
color: #d5d8e2;
margin: 40px auto;
align-items: center;
text-align: center
}
body .success p {
font-size: 14px
}
body p {
color: #5b5e6f;
font-size: 10px;
text-align: left
}
body .testtwo {
left: -320px!important
}
body .test {
box-shadow: 0px 20px 30px 3px rgba(0, 0, 0, 0.55);
pointer-events: none;
top: -100px!important;
transform: rotateX(70deg) scale(0.8)!important;
opacity: 0.6!important;
filter: blur(1px)
}
body .login {
opacity: 1;
z-index: -1;
top: 20px;
height: 300px;
width: 240px;
-webkit-transition-timing-function: cubic-bezier(0.68, -0.25, 0.265, 0.85);
transition-property: transform, opacity, box-shadow, top, left;
transition-duration: 0.5s;
transform-origin: 161px 100%;
transform: rotateX(0deg);
position: relative;
border-top: 2px solid #d8312a;
position: absolute;
left: 0;
right: 0;
margin: auto;
top: 0;
bottom: 0;
padding: 100px 40px 40px 40px;
background: #35394a;
background: -moz-linear-gradient(45deg, #35394a 0%, #1f222e 100%);
background: -webkit-gradient(linear, left bottom, right top, color-stop(0%, #35394a), color-stop(100%, #1f222e));
background: -webkit-linear-gradient(45deg, #35394a 0%, #1f222e 100%);
background: -o-linear-gradient(45deg, #35394a 0%, #1f222e 100%);
background: -ms-linear-gradient(45deg, #35394a 0%, #1f222e 100%);
background: linear-gradient(45deg, #35394a 0%, #1f222e 100%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#35394a', endColorstr='#1f222e', GradientType=1)
}
body .login .validation {
position: absolute;
z-index: 1;
right: 10px;
top: 6px;
opacity: 0
}
body .login .disclaimer {
position: absolute;
bottom: 20px;
left: 35px;
width: 250px
}
body .login_title {
color: #afb1be;
height: 60px;
text-align: left;
font-size: 16px
}
body .login_fields {
height: 208px;
position: absolute;
left: 0
}
body .login_fields .icon {
position: absolute;
z-index: 1;
left: 36px;
top: 8px;
opacity: 0.5
}
body .login_fields input[type="password"] {
color: #dc6180!important
}
body .login_fields input[type="text"],
body .login_fields input[type="password"] {
color: #afb1be;
width: 190px;
margin-top: -2px;
background: #32364a;
left: 0;
padding: 10px 65px;
border-top: 2px solid #393d52;
border-bottom: 2px solid #393d52;
border-right: none;
border-left: none;
outline: none;
font-family: "Gudea", sans-serif;
box-shadow: none
}
body .login_fields__user,
body .login_fields__password {
position: relative
}
body .login_fields__submit {
position: relative;
top: 35px;
left: 0;
width: 80%;
right: 0;
margin: auto
}
body .login_fields__submit .forgot {
float: right;
font-size: 10px;
margin-top: 11px;
text-decoration: underline
}
body .login_fields__submit .forgot a {
color: #606479
}
body .login_fields__submit input {
border-radius: 50px;
background: transparent;
padding: 10px 50px;
border: 2px solid #dc6180;
color: #dc6180;
text-transform: uppercase;
font-size: 11px;
transition-property: background, color;
transition-duration: 0.2s
}
body .login_fields__submit input:focus {
box-shadow: none;
outline: none
}
body .login_fields__submit input:hover {
color: white;
background: #dc6180;
cursor: pointer;
transition-property: background, color;
transition-duration: 0.2s
}
.love {
position: absolute;
right: 20px;
bottom: 0px;
font-size: 11px;
font-weight: normal
}
.love p {
color: white;
font-weight: normal;
font-family: "Open Sans", sans-serif
}
.love a {
color: white;
font-weight: 700;
text-decoration: none
}
.love img {
position: relative;
top: 3px;
margin: 0px 4px;
width: 10px
}
.brand {
position: absolute;
left: 20px;
bottom: 14px
}
.brand img {
width: 30px
}
h1 {
position: relative;
text-align: center;
color: #353535;
font-size: 50px;
font-family: "Cormorant Garamond", serif
}
p {
font-family: "Lato", sans-serif;
font-weight: 300;
text-align: center;
font-size: 18px;
color: #676767
}
.frame {
width: 90%;
margin: 40px auto;
text-align: center
}
.thumb_img {
max-width: 110%;
margin-left: -14px;
margin-top: -54px
}
button {
margin: 20px
}
.custom-btn {
width: 130px;
height: 40px;
color: #fff;
border-radius: 5px;
padding: 10px 25px;
font-family: "Lato", sans-serif;
font-weight: 500;
background: transparent;
cursor: pointer;
transition: all 0.3s ease;
position: relative;
display: inline-block;
box-shadow: inset 2px 2px 2px 0px rgba(255, 255, 255, 0.5), 7px 7px 20px 0px rgba(0, 0, 0, 0.1), 4px 4px 5px 0px rgba(0, 0, 0, 0.1);
outline: none
}
.btn {
border: none;
background: rgb(251, 33, 117);
background: linear-gradient(0deg, rgba(251, 33, 117, 1) 0%, rgba(234, 76, 137, 1) 100%);
color: #fff;
overflow: hidden;
margin: auto;
margin-top: 10px
}
.btn:hover {
text-decoration: none;
color: #fff
}
.btn:before {
position: absolute;
content: "";
display: inline-block;
top: -180px;
left: 0;
width: 30px;
height: 100%;
background-color: #fff;
animation: shiny-btn1 3s ease-in-out infinite
}
.btn:hover {
opacity: 0.7
}
.btn:active {
box-shadow: 4px 4px 6px 0 rgba(255, 255, 255, 0.3), -4px -4px 6px 0 rgba(116, 125, 136, 0.2), inset -4px -4px 6px 0 rgba(255, 255, 255, 0.2), inset 4px 4px 6px 0 rgba(0, 0, 0, 0.2)
}
#-webkit-keyframes shiny-btn1 {
0% {
-webkit-transform: scale(0) rotate(45deg);
opacity: 0
}
80% {
-webkit-transform: scale(0) rotate(45deg);
opacity: 0.5
}
81% {
-webkit-transform: scale(4) rotate(45deg);
opacity: 1
}
100% {
-webkit-transform: scale(50) rotate(45deg);
opacity: 0
}
}
#context-menu {
position: absolute;
height: auto;
display: block;
top: 10%;
left: 40%;
border-radius: 5px;
width: 200px
}
ul {
list-style-type: none
}
li.menu-items {
height: 50px;
margin-top: 7px;
background-color: #fff;
box-shadow: 0 2px 20px 2px #22222225;
width: 100%;
border-radius: 4px;
font-size: 20px;
color: #444;
line-height: 50px;
vertical-align: middle;
padding-left: 15px;
cursor: pointer;
transition: all 0.1s ease-in;
transform-origin: top left;
transform: rotateY(90deg) rotateX(45deg)
}
li.menu-items:nth-child(1) {
transition: transform 0.25s 0s cubic-bezier(0, 0.36, 0.95, -0.2), background-color 0.15s ease-in
}
li.menu-items:nth-child(2) {
transition: transform 0.25s 0.15s cubic-bezier(0, 0.36, 0.95, -0.2), background-color 0.15s ease-in
}
li.menu-items:nth-child(3) {
transition: transform 0.25s 0.3s cubic-bezier(0, 0.36, 0.95, -0.2), background-color 0.15s ease-in
}
li.menu-items:nth-child(4) {
transition: transform 0.25s 0.45s cubic-bezier(0, 0.36, 0.95, -0.2), background-color 0.15s ease-in
}
li.menu-items:hover {
background-color: coral;
color: #fff;
transform: perspective(10px)
}
a img {
border: 0
}
h1 {
font: bold 32px Helvetica, Arial, Sans-Serif;
letter-spacing: -1px;
margin: 50px 0 20px 0
}
p {
margin: 0 0 20px 0
}
.close-icon:hover {
background: #efefef
}
*,
*::before,
*::after {
margin: 0;
padding: 0
}
html {
scroll-behavior: smooth
}
#header {
font-family: "Poppins", sans-serif
}
#header a {
text-decoration: none
}
#header ul {
list-style: none
}
#header img {
width: 100%
}
#header .container {
position: relative;
z-index: 5;
max-width: 92rem;
padding: 0 4rem;
margin: 0 auto
}
.stop-scrolling {
height: 150%;
overflow: hidden
}
#header .grid-2 {
display: grid;
grid-template-columns: repeat(2, 1fr);
align-items: center;
justify-content: center
}
#header .text {
font-size: 1.25rem;
color: var(--dark-two);
line-height: 1.6
}
.column-1 {
margin-right: 1.5rem
}
.column-2 {
margin-left: 1.5rem
}
#header .image {
position: relative;
display: flex;
align-items: center;
justify-content: center
}
.z-index {
position: relative;
z-index: 2
}
#header .overlay {
position: absolute;
width: 100%;
height: 100%;
overflow: hidden;
top: 0;
left: 0
}
#header .overlay .shape {
width: initial;
opacity: 0.13;
position: absolute
}
#header .overlay.overlay-lg .shape {
height: 55px
}
#header .overlay.overlay-lg .shape.wave {
height: initial;
width: 88px
}
#header .overlay.overlay-lg .shape.xshape {
height: 38px
}
#header .overlay.overlay-sm .shape {
filter: brightness(0) invert(1);
opacity: 0.15;
height: 40px
}
#header .overlay.overlay-sm .shape.wave {
height: initial;
width: 70px
}
#header .overlay.overlay-sm .shape.xshape {
height: 30px
}
#header .points {
opacity: 0.3;
position: absolute
}
#header .section {
padding: 7rem 0;
overflow: hidden
}
.section-header {
text-align: center;
margin-bottom: 1.5rem
}
#header .title {
position: relative;
display: inline-block;
padding-bottom: 1rem;
line-height: 1;
font-size: 2.8rem;
margin-bottom: 0.6rem
}
#header .title:before {
content: attr(data-title);
display: block;
margin-bottom: 0.4rem;
color: var(--main-color);
font-size: 1.15rem;
font-weight: 500;
text-transform: uppercase;
letter-spacing: 3px
}
#header .title:after {
content: "";
position: absolute;
width: 90px;
height: 5px;
border-radius: 3px;
background-color: var(--main-color);
bottom: 0;
left: 50%;
transform: translateX(-50%)
}
#header .section-header .text {
max-width: 600px;
margin: 0 auto
}
#header .title-sm {
color: var(--dark-one);
font-weight: 600;
font-size: 1.6rem
}
#header .points-sq {
width: 210px
}
#header .btn {
display: inline-block;
padding: 0.85rem 2rem;
background-color: var(--main-color);
color: var(--light-one);
border-radius: 2rem;
font-size: 1.05rem;
text-transform: uppercase;
font-weight: 500;
transition: 0.3s
}
#header .btn:hover {
background-color: #6b44e0
}
#header .btn.small {
padding: 0.7rem 1.8rem;
font-size: 1rem
}
header {
width: 100%;
background-color: var(--light-three);
overflow: hidden;
position: relative
}
#header nav {
width: 100%;
position: relative;
z-index: 50
}
#header nav .container {
display: flex;
justify-content: space-between;
height: 4.5rem;
align-items: center
}
#header .logo {
width: 65px;
display: flex;
align-items: center
}
.links ul {
display: flex
}
.links a {
display: inline-block;
padding: 0.9rem 1.2rem;
color: var(--dark-one);
font-size: 1.05rem;
text-transform: uppercase;
font-weight: 500;
line-height: 1;
transition: 0.3s
}
.links a.active {
background-color: var(--main-color);
color: var(--light-one);
border-radius: 2rem;
font-size: 1rem;
padding: 0.9rem 2.1rem;
margin-left: 1rem
}
.links a:hover {
color: var(--main-color)
}
.links a.active:hover {
color: var(--light-one);
background-color: #6b44e0
}
.hamburger-menu {
width: 2.7rem;
height: 3rem;
z-index: 100;
position: relative;
display: none;
align-items: center;
justify-content: flex-end
}
.hamburger-menu .bar {
position: relative;
width: 2.1rem;
height: 3px;
border-radius: 3px;
background-color: var(--dark-one);
transition: 0.5s
}
.bar:before,
.bar:after {
content: "";
position: absolute;
width: 2.1rem;
height: 3px;
border-radius: 3px;
background-color: var(--dark-one);
transition: 0.5s
}
.bar:before {
transform: translateY(-9px)
}
.bar:after {
transform: translateY(9px)
}
nav.open .hamburger-menu .bar {
background-color: transparent;
transform: rotate(360deg)
}
nav.open .hamburger-menu .bar:before {
transform: translateY(0) rotate(45deg);
background-color: var(--light-one)
}
nav.open .hamburger-menu .bar:after {
transform: translateY(0) rotate(-45deg);
background-color: var(--light-one)
}
nav.open .links {
transform: translateX(0)
}
.header-content .container.grid-2 {
grid-template-columns: 2.5fr 3.5fr;
min-height: calc(100vh - 6rem);
padding-bottom: 2.5rem;
text-align: left
}
.header-title {
font-size: 3.8rem;
line-height: 0.8;
color: var(--dark-one)
}
.header-content .text {
margin: 2.15rem 0
}
.header-content .image .img-element {
max-width: 750px
}
header .points1 {
width: 420px;
bottom: -75px;
left: -150px
}
header .points2 {
width: 70%;
top: 65%;
left: 71%
}
header .square {
right: 68%;
top: 71%
}
header .triangle {
right: 7%;
bottom: 75%
}
header .xshape {
right: 4%;
bottom: 50%
}
header .half-circle1 {
left: 50%;
bottom: 82%
}
header .half-circle2 {
left: 5%;
top: 67%
}
header .wave1 {
bottom: 75%;
left: 20%
}
header .wave2 {
bottom: 8%;
right: 55%
}
header .circle {
left: 38%;
bottom: 63%
}
.letters {
position: absolute;
width: 13.5%;
top: -5px;
left: 15px;
opacity: 0.06
}
#media (max-width:1280px) {
.overlay.overlay-lg .shape {
height: 35px
}
.overlay.overlay-lg .shape.wave {
height: initial;
width: 63px
}
.overlay.overlay-lg .shape.xshape {
height: 24px
}
header .points1 {
width: 270px;
bottom: -50px;
left: -75px
}
header .letters {
width: 11%
}
nav .container {
height: 4.5rem
}
.logo {
width: 65px
}
.links a {
font-size: 0.8rem;
padding: 0.65rem 0.7rem
}
.links a.active {
font-size: 0.7rem;
padding: 0.7rem 1.7rem;
margin-left: 0.6rem
}
}
#media (max-width:425px) {
.connection-wrapper .toast {
width: 300px
}
}
#media (max-width:850px) {
.hamburger-menu {
display: flex;
margin-right: -2rem
}
#header img {
margin-left: -3rem
}
.links {
position: fixed;
width: 100%;
height: 100vh;
top: 0;
right: 0;
background-color: #252525;
display: none;
align-items: center;
justify-content: center;
text-align: center;
transform: translateX(100%);
transition: 0.5s
}
.links ul {
flex-direction: column
}
.links a {
color: var(--light-one)
}
.links a.active {
margin-left: 0;
margin: 0.5rem 0
}
.letters,
header .half-circle2,
header .points1,
header .wave2 {
display: none
}
header .half-circle1 {
bottom: 55%;
left: 23%
}
header .circle {
left: 8%;
bottom: 40%
}
header .wave1 {
bottom: 87%;
left: 75%
}
header .square {
top: initial;
bottom: 5%;
left: 13%
}
header .triangle {
right: 14%;
bottom: 63%
}
header .xshape {
left: 90%;
top: 54%
}
}
#media (max-width:560px) {
.container {
padding: 0 2rem
}
.overlay.overlay-lg .shape {
height: 28px
}
.overlay.overlay-lg .shape.wave {
height: initial;
width: 52px
}
.overlay.overlay-lg .shape.xshape {
height: 22px
}
}
footer {
bottom: 0;
color: #14171a;
font-family: "Balsamiq Sans", sans-serif
}
footer a,
footer a:hover {
text-decoration: none;
color: inherit
}
.page-footer {
margin-top: 35px;
border-top: 1px solid #e6e5e6
}
.primary-footer {
padding: 36px 0!important;
background-color: #f2f3f5;
color: #666;
font-size: 14px;
line-height: 24px
}
.primary-footer ul {
margin: 0;
padding: 0;
list-style-type: none
}
.primary-footer .copyright {
margin-bottom: 0
}
.primary-footer ul li {
display: inline-block;
margin-right: 16px
}
.primary-footer a {
color: #737373;
font-weight: 600
}
.primary-footer .dislaimer {
border-top: 1px solid #e4e2e4;
margin: 23px 0 0;
padding-top: 23px;
font-weight: 300
}
.primary-footer a {
color: #737373;
font-weight: 600;
transition: color 0s ease-in-out
}
.primary-footer .dislaimer a {
font-weight: 300;
transition: all 0s ease
}
.primary-footer a:hover {
text-decoration: none;
color: var(--hover)
}
#media only screen and (max-width:767px) {
.primary-footer .copyright {
width: 100%;
text-align: center;
margin-top: 12px
}
.primary-footer ul {
text-align: center;
width: 100%
}
}
footer .flex {
display: flex
}
footer .flex-wrap {
flex-wrap: wrap
}
footer .justify-content-between {
justify-content: space-between
}
footer .align-items-center {
align-items: center
}
footer .text-center {
text-align: center
}
footer .position-relative {
position: relative
}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />
<title>Download Now</title>
<link href="https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.2/themes/smoothness/jquery-ui.css" rel="stylesheet" />
<link href="https://unicons.iconscout.com/release/v3.0.6/css/line.css" rel="stylesheet" />
</head>
<body>
<header id="header">
<nav>
<div class="container">
<div class="logo">
<img src="./favicon.ico" alt="" />
</div>
<div class="links">
<ul>
<li>
Why Us?
</li>
<li>
FAQs
</li>
<li>
Stats
</li>
<li>
Support Group
</li>
</ul>
</div>
<div class="hamburger-menu">
<div class="bar"></div>
</div>
</div>
</nav>
</header>
<form id="download_video">
<div class="login">
<div class="login_title"><span>Download Videos Online</span></div>
<input type="hidden" name="sss" value="VideoDownloader" />
<div class="login_fields">
<div class="login_fields__user">
<div class="icon"><img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/217233/user_icon_copy.png" /></div>
<input type="text" id="video" name="video_url" placeholder="Video URL" />
<div class="validation"><img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/217233/tick.png" /></div>
</div>
<div class="login_fields__submit">
<input type="button" id="get_formats" name=jjs " value="Check Link " />
<div class="forgot ">
Supported Websites
</div>
</div>
</div>
<div class="success " id="formats ">
<img class="thumb_img " id="thumb_img " src="image/not-available.png " height="150 " align="middle " />
<br />
<br />
<label for="standard-select ">Select the preferred quality</label>
<select id="standard-select "></select>
</div>
<div class="disclaimer ">
<p>No Porn Allowed</p>
</div>
</div>
</form>
<div id="context-menu " style="display: none; ">
<ul>
<li class="menu-items ">Developer</li>
<li class="menu-items ">Support Group</li>
<li class="menu-items ">Reload</li>
<li class="menu-items ">Source Code</li>
<li class="menu-items ">Inspect</li>
</ul>
</div>
<div class="authent ">
<img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/217233/puff.svg " />
<p>Checking URL....</p>
</div>
<footer class="page-footer ">
<div class="primary-footer position-relative ">
<div class="container ">
<div class="flex flex-wrap justify-content-between align-items-center ">
<ul>
<li><a title="About " href="/about-us ">About</a></li>
<li><a title="Privacy Policy " href="/privacy-policy ">Privacy Policy</a></li>
<li><a title="Terms of Service " href="/terms ">Terms of Service</a></li>
<li><a title="Contact Us " href="/contact-us ">Contact Us</a></li>
</ul>
<p class="copyright ">Copyright © 2022 All rights reserved.</p>
</div>
<p class="dislaimer text-center ">
Disclaimer:- <a title="WeSing Downloader " href="/ ">DLNow.ml</a>
is Not associated with Any Supported Sites in any ways and DLNow.ml does not host any of the video or audio on our servers, and all videos or audio that you download from our tool are downloaded from their respective
CDN servers.
</p>
</div>
</div>
</footer>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js "></script>
<script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.2/jquery-ui.min.js "></script>
<script src="static/js/index.js "></script>
</body>
</html>
But in it my Footer is not aligning to the bottom of the page...
I have tried setting position: absolute; but it work but it is covering the main content.
I also tried setting the bottom: 0; but it was also found not to be working.
So, kindly help me to get out of it...
Original Look
Look with absolute position
https://i.stack.imgur.com/43z0u.jpg
https://i.stack.imgur.com/nNHE2.jpg
UPDATED
I did modify some of your CSS, you can check it out here
https://jsfiddle.net/wmLvqyj4/3/
For the mobile's screen size, it's too small for your form but tablet and desktop's are good
OLD ANSWER
I cannot run your CSS properly but can suggest you to do this way https://jsfiddle.net/479dnqy2/1/
Usually, a page footer is a static content, so we briefly know its height. You can set your page content's height with this formula your content height = full page height - footer height
.page-content {
min-height: calc(100vh - 10rem); /*10rem is the size of footer*/
}
.page-footer {
height: 10rem; /*the fixed height of the footer*/
}
How about this?
footer {
position: fixed;
bottom: 0;
}
or
footer {
position: absolute;
bottom: 0;
width: 100%;
height: 2.5rem; /* Footer height */
}
I really like drawing with CSS, and I've just finished drawing this Diglett using nothing more than CSS.
However, as good as it looks on my desktop, it isn't responsive and I don't know how to make it. I noticed this while transferring it to codepen.
.diglett {
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
}
.body {
height: 230px;
width: 200px;
background-color: #b1917e;
border-radius: 100px 100px 0 0;
border-top: 2px solid #040202;
border-right: 2px solid #040202;
border-left: 2px solid #040202;
overflow-y: hidden;
}
.head-shine {
position: relative;
left: 0px;
top: 0px;
height: 50px;
width: 140px;
color: #c9b3a4;
background-color:currentColor;
filter: blur(8px);
border-radius: 100px / 50px;
transform: rotate(160deg);
z-index: 1;
}
.head-shine2 {
position: relative;
left: -10px;
top: -250px;
height: 200px;
width: 100px;
color: #b49580;
filter: blur(10px);
border-radius: 50%;
transform: rotate(80deg);
}
.left-eye{
position: absolute;
height: 30px;
width: 8px;
border-radius: 40% 40%;
color: black;
background-color: black;
transform: rotate(5deg);
box-shadow:
inset -1px -6px 7px -2px #595a5a;
border: solid 2px black;
left: 45.4%;
top: 8%;
z-index: 2;
}
.right-eye{
position: absolute;
height: 30px;
width: 8px;
border-radius: 40% 40%;
color: black;
background-color: black;
transform: rotate(5deg);
box-shadow:
inset -1px -6px 7px -2px #595a5a;
border: solid 2px black;
left: 50%;
top: 8.2%;
z-index: 2 ;
}
.eye-shines{
position: absolute;
height: 7px;
width: 6px;
background-color: white;
border-radius: 50%;
left: 45.7%;
top: 8.2%;
box-shadow:
9.7vmin 0 0 0 white;
z-index: 8;
filter: blur(0.8px);
transform: rotate(2deg);
}
.mouth {
position: absolute;
height: 41px;
width: 77px;
background-color: #b982a2;
border-radius: 46% 46% 46% 46%;
border: 3px solid #040202;
left: 44.6%;
top: 14.5%;
z-index: 2;
}
.mouth-shine {
position: absolute;
height: 30px;
width: 60px;
background-color: #e5b6d3;
border-radius: 50%;
left: 45%;
top: 15.3%;
z-index: 3;
filter: blur(2px);
}
.mouth-shine2 {
position: absolute;
height: 9px;
width: 18px;
background-color: #f4e4f0;
border-radius: 50%;
transform: rotate(-8deg);
left: 45.8%;
top: 16.2%;
z-index: 4;
filter: blur(1.5px);
}
.soil{
position: absolute;
width: 80px;
height: 80px;
background-color: #828388;
border-radius: 50% 50% 0 0;
transform: translate(80%, -55%);
filter:
drop-shadow(0 2px black)
drop-shadow(0 -2px black)
drop-shadow(2px 0 black)
drop-shadow(-2px 0 black);
color: #828388;
box-shadow:
-6vmin 1vmin 0 -2vmin,
-12vmin 1vmin 0 -1vmin,
7vmin 1.25vmin 0 -1.75vmin,
12vmin 1.25vmin 0 -1.25vmin,
-18vmin 1.25vmin 0 -1.25vmin,
18vmin 1.25vmin 0 -1.25vmin;
z-index: 6;
}
<html>
<head>
<title>Diglett</title>
<meta name="viewport" content="width=device-width,initial-scale=1"/>
<link rel="stylesheet" href="style.css">
</head>
<body>
<div class="diglett">
<div class="body">
<div class="eyes">
<div class="left-eye"></div>
<div class="right-eye"></div>
<div class="eye-shines"></div>
</div>
<div class="head">
<div class="head-shine"></div>
<div class="head-shine2"></div>
</div>
<div class="mouth"></div>
<div class="mouth-shine"></div>
<div class="mouth-shine2"></div>
<div class="soil"></div>
</div>
</div>
</body>
</html>
Full codepen: https://codepen.io/devjuanv/pen/qBjYgEB
So: 1) could u help me updating the code so it looks as intended in every viewport? and 2) could you provide at least a short explanation on what you did?
It would mean lot for my learning! Thank u!!!
This is how it looks on my desktop:
Help me, how to switch the initial toggle button condition from day to night?
/*
F5EB42 - sun inner
E4C74D - sun outer
FFFFFF - cloud inner
D4D4D2 - cloud outer
81C0D5 - parent outer
C0E6F6 - parent inner
FFFDF2 - moon inner
DEE1C5 - moon outer
FCFCFC - stars
*/
body {
background-color: #F3F3F3;
}
.wrapper {
padding-top: 40px;
text-align: center;
}
.toggle {
position: relative;
display: inline-block;
width: 100px;
margin-left: 100px;
padding: 4px;
border-radius: 40px;
}
.toggle:before,
.toggle:after {
content: '';
display: table;
}
.toggle:after {
clear: both;
}
.toggle-bg {
position: absolute;
top: -4px;
left: -4px;
width: 100%;
height: 100%;
background-color: #C0E6F6;
border-radius: 40px;
border: 4px solid #81C0D5;
transition: all 0.1s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.toggle-input {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
border: 1px solid red;
border-radius: 40px;
z-index: 2;
opacity: 0;
}
.toggle-switch {
position: relative;
width: 40px;
height: 40px;
margin-left: 50px;
background-color: #F5EB42;
border: 4px solid #E4C74D;
border-radius: 50%;
transition: all 0.1s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.toggle-switch-figure {
position: absolute;
bottom: -14px;
left: -50px;
display: block;
width: 80px;
height: 30px;
border: 8px solid #D4D4D2;
border-radius: 20px;
background-color: #fff;
-webkit-transform: scale(0.4);
transform: scale(0.4);
transition: all 0.12s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.toggle-switch-figure:after {
content: '';
display: block;
position: relative;
top: -65px;
right: -42px;
width: 15px;
height: 15px;
border: 8px solid #D4D4D2;
border-radius: 100%;
border-right-color: transparent;
border-bottom-color: transparent;
-webkit-transform: rotateZ(70deg);
transform: rotateZ(70deg);
background-color: #fff;
}
.toggle-switch-figure:before {
content: '';
display: block;
position: relative;
top: -25px;
right: -10px;
width: 30px;
height: 30px;
border: 8px solid #D4D4D2;
border-radius: 100%;
border-right-color: transparent;
border-bottom-color: transparent;
-webkit-transform: rotateZ(30deg);
transform: rotateZ(30deg);
background-color: #fff;
}
.toggle-switch-figureAlt {
content: '';
position: absolute;
top: 5px;
left: 2px;
width: 2px;
height: 2px;
background-color: #EFEEDA;
border-radius: 100%;
border: 4px solid #DEE1C5;
box-shadow: 42px -7px 0 -3px #FCFCFC, 75px -10px 0 -3px #FCFCFC, 54px 4px 0 -4px #FCFCFC, 83px 7px 0 -2px #FCFCFC, 63px 18px 0 -4px #FCFCFC, 44px 28px 0 -2px #FCFCFC, 78px 23px 0 -3px #FCFCFC;
transition: all 0.12s cubic-bezier(0.25, 0.46, 0.45, 0.94);
-webkit-transform: scale(0);
transform: scale(0);
}
.toggle-switch-figureAlt:before {
content: '';
position: absolute;
top: -6px;
left: 18px;
width: 7px;
height: 7px;
background-color: #EFEEDA;
border-radius: 100%;
border: 4px solid #DEE1C5;
}
.toggle-switch-figureAlt:after {
content: '';
position: absolute;
top: 19px;
left: 15px;
width: 2px;
height: 2px;
background-color: #EFEEDA;
border-radius: 100%;
border: 4px solid #DEE1C5;
}
.toggle-input:checked ~ .toggle-switch {
margin-left: 0;
border-color: #DEE1C5;
background-color: #FFFDF2;
}
.toggle-input:checked ~ .toggle-bg {
background-color: #484848;
border-color: #202020;
}
.toggle-input:checked ~ .toggle-switch .toggle-switch-figure {
margin-left: 40px;
opacity: 0;
-webkit-transform: scale(0.1);
transform: scale(0.1);
}
.toggle-input:checked ~ .toggle-switch .toggle-switch-figureAlt {
-webkit-transform: scale(1);
transform: scale(1);
}
<div class="wrapper">
<div class="toggle">
<input class="toggle-input" type="checkbox" />
<div class="toggle-bg"></div>
<div class="toggle-switch">
<div class="toggle-switch-figure"></div>
<div class="toggle-switch-figureAlt"></div>
</div>
</div>
</div>
should I change "before" and "after" in some cases? or...
Just add the checked attribute to input
<input checked class="toggle-input" type="checkbox" />
change the input tag and set the checked attribute to false. It will work then. Always better to use the checked attribute of the input when you are defining the initial behavior of the component
<input class="toggle-input" type="checkbox" checked="false"/>
This question already has answers here:
CSS box shadow around a custom shape?
(3 answers)
Closed 5 years ago.
Hi Guys i am trying to add a box shadow around the custom shape created using css
like the below image
body{
padding:50px
}
div{
height: 45px;
width: 209px;
float: left;
color: #fff;
line-height: 45px;
text-align: center;
position: relative;
font-family: Arial;
font-weight: bold;
font-size: 16px;
background-color: #50b3cf;
}
div::after{
position: absolute;
z-index: 2;
content: "";
width: 0;
height: 0;
border-top: 22.5px solid transparent;
border-bottom: 22.5px solid transparent;
right: 1px;
transform: translateX(100%);
border-left: 22.5px solid #50b3cf;
}
<div></div>
Declare values for the pseudo-element width & height
properties;
purge the borders;
then rotate the pseudo-element in question;
now apply box-shadow as required;
grab a nice cold one;
body{
padding:50px
}
div{
height: 45px;
width: 209px;
float: left;
color: #fff;
line-height: 45px;
text-align: center;
position: relative;
font-family: Arial;
font-weight: bold;
font-size: 16px;
background-color: #50b3cf;
box-shadow: 0px 0px 5px 3px #000000;
}
div::after {
position: absolute;
z-index: 2;
content: "";
left: 100%;
width: 32px;
height: 32px;
background: #50b3cf;
transform: rotate(46deg);
transform-origin: 0 0;
box-shadow: 3px -3px 5px 0px #000000;
}
div::before { /* ver 2.0 Patch */
content: "";
position: absolute;
background: #50b3cf;
top: 0;
bottom: 0;
width: 25px;
right: 0;
z-index: 9;
}
<div></div>
.box{
border:1px solid white;
width:400px;
height:150px;
margin-left:40px;
box-shadow: 0 0 9px 3px rgba(0,0,0,0.5);
}
.arrow {
width: 100px;
height: 100px;
position: relative;
top:20px;
left:-100px;
overflow: hidden;
box-shadow: 0 10px 10px -17px rgba(0,0,0,0.5);
transform: rotate(270deg);
}
.arrow:after {
content: "";
position: absolute;
width: 50px;
height: 50px;
background: white;
transform: rotate(45deg);
top: 76px;
left: 25px;
box-shadow: -2px -2px 9px 0px rgba(0,0,0,0.5);
}
<div class="box">
<div class="arrow"></div>
</div>
Try this code
Maybe this what you are looking to do.
The first one with box shadow, the second one doesn't has box shadow but you can add it using this code box-shadow: 0px 0px 6px 0px #000;in class "arrow-r"
<style type="text/css">
.main-box{
position: relative;
padding: 0 35px 90px;
}
.box{
font-size: 20px;
position: relative;
display: inline-block;
clear: both;
margin-bottom: 8px;
padding: 13px 14px;
vertical-align: top;
border-radius: 5px;
}
.arrow-l {
float: left;
color: #fff;
background-color: #08abf4; box-shadow: 0px 0px 6px 0px #000;
}
.arrow-r {
float: right;
color: #1a1a1a;
background-color: #e2e2e2;
}
.box:before{
position: absolute;
top: 24px;
width: 8px;
height: 6px;
content: '\00a0';
-webkit-transform: rotate(30deg) skew(-36deg);
transform: rotate(30deg) skew(-36deg);
}
.box.left:before {
left: -4px;
background-color: #08abf4;
}
.box:before{
position: absolute;
top: 21px;
width: 8px;
height: 6px;
content: '\00a0';
-webkit-transform: rotate(30deg) skew(-36deg);
transform: rotate(30deg) skew(-36deg);
}
.box.right:before {
right: -4px;
background-color: #e2e2e2;
}
</style>
<div class="main-box">
<div class="box arrow-l left">
I'm Liam Lababidi
</div>
<div class="box arrow-r right">
What about u?
</div>
</div>
You want to use box-shadow: 10px 10px 5px #888888; for this. Each px indicates what side and the # indicates the color.
body{
padding:50px
}
div{
height: 45px;
width: 209px;
float: left;
color: #fff;
line-height: 45px;
text-align: center;
position: relative;
font-family: Arial;
font-weight: bold;
font-size: 16px;
background-color: #50b3cf;
box-shadow: 0px 10px 5px #888888;
}
div::after{
position: absolute;
z-index: 2;
content: "";
width: 0;
height: 0;
border-top: 22.5px solid transparent;
border-bottom: 22.5px solid transparent;
right: 1px;
transform: translateX(100%);
border-left: 22.5px solid #50b3cf;
}
<div></div>
HTML
<div class="container-screenz service-graphic sg2">
<div class="screenz monitor">
<img src="img/geoqueri-monitor.jpg">
</div>
<div class="laptop">
<div class="screenz">
<img src="img/geoqueri-laptop.jpg">
</div>
<div class="btm"></div>
</div>
<div class="phone">
<div class="screenz">
<img src="img/geoqueri-phone.jpg">
</div>
<div class="shadow"></div>
</div>
<div class="ipad">
<div class="screenz">
<img src="img/geoqueri-tablet.jpg">
</div>
</div>
</div>
CSS (with added prefixes)
#keyframes scroll {
20%,
60% {
-webkit-transform:translateY(-62%);
-moz-transform:translateY(-62%);
-ms-transform:translateY(-62%);
-o-transform:translateY(-62%);
transform:translateY(-62%);
}
80% {
margin-top: -50px;
}
}
.service-graphic {
max-width: 42.500em;
font-size: 8px;
padding: 1em;
position: relative;
display: block;
margin: 0 auto;
.monitor {
width: 28.750em;
height: 17.5em;
position: relative;
background: #f8f8f8;
border: 0.625em solid #1f1f1f;
#include border-radius(0.625em);
border: 1.25em solid #1f1f1f;
margin: 0 auto;
.content-screenz {
width: 26.25em;
height: 15em;
left: 50%;
margin-left: -13.125em;
overflow: hidden;
}
&:before, &:after {
content: "";
position: absolute;
left: 50%;
}
&:before {
top: -0.25em;
margin: -0.188em 0 0 -0.188em;
width: 0.250em;
height: 0.250em;
#include border-radius(0.250em);
background: #d8dbe1;
top: -0.625em;
}
}
.laptop {
&:before {
content: "";
position: absolute;
left: 50%;
top: -0.25em;
margin: -0.188em 0 0 -0.188em;
width: 0.250em;
height: 0.250em;
#include border-radius(0.250em);
background: #d8dbe1;
top: -0.625em;
}
}
}
.screenz {
&:after {
width: 0.500em;
height: 0.500em;
#include border-radius(0.500em);
margin: 0 0 -0.25em -0.25em;
background: #e8ebf0;
bottom: -0.625em;
}
}
.monitor > div {
position: absolute;
}
.monitor .content-screenz:before,
.laptop .screenz:before,
.phone .screenz:before,
.ipad .screenz:before {
content: "";
position: absolute;
right: -5.625em;
width: 12.500em;
height: 18.750em;
-webkit-transform:rotate(45deg);
-moz-transform:rotate(45deg);
-ms-transform:rotate(45deg);
-o-transform:rotate(45deg);
transform:rotate(45deg);
/*linear-gradient*/
background:-webkit-gradient(linear,left top,left bottom,color-stop(rgba(255, 255, 255, 0.5),0),color-stop(rgba(255, 255, 255, 0),1));
/*##prefixmycss->No equivalent*/
background:-webkit-linear-gradient(to bottom, rgba(255, 255, 255, 0.5) 0%, rgba(255, 255, 255, 0) 100%);
background: -moz-linear-gradient(to bottom, rgba(255, 255, 255, 0.5) 0%, rgba(255, 255, 255, 0) 100%);
background: -o-linear-gradient(to bottom, rgba(255, 255, 255, 0.5) 0%, rgba(255, 255, 255, 0) 100%);
background: linear-gradient(to bottom, rgba(255, 255, 255, 0.5) 0%, rgba(255, 255, 255, 0) 100%);
z-index: 5;
}
.browser {
width: 15em;
height: 11.250em;
position: absolute;
left: 50%;
top: 50%;
margin: -5.625em 0 0 -7.5em;
background: #ffffff;
border: 1px solid #e8ebf0;
border-top: 1.25em solid #d8dbe1;
#include border-radius(0.313em);
}
.browser-content {
overflow: hidden;
height: 9.938em;
padding-top: 0.625em;
}
.btns {
position: absolute;
top: -1.25em;
left: 0.438em;
&:before {
content: "";
position: absolute;
left: 2.188em;
top: 0.313em;
height: 0.625em;
width: 11.563em;
background: #fff;
#include border-radius(3px);
}
}
.btns > li {
display: inline-block;
list-style: none;
width: 0.313em;
height: 0.313em;
#include border-radius(0.313em);
background: #fc5254;
margin-right: 0.250em;
}
.btns li:nth-child(2) {
background: #fcae52;
}
.btns li:nth-child(3) {
background: #66b34e;
}
.base {
width: 5.625em;
height: 3.1em;
bottom: -3.9em;
left: 50%;
margin-left: -2.8125em;
background: #e8ebf0;
bottom: -4.3em;
z-index: -1;
}
.base:before,
.base:after,
.grey-shadow:before,
.grey-shadow:after {
content: "";
position: absolute;
top: 0;
}
.base:before {
border-left: 0.813em solid transparent;
border-right: 0px solid transparent;
border-bottom: 3.125em solid #e8ebf0;
left: -0.77em;
}
.base:after {
border-right: 0.813em solid transparent;
border-left: 0px solid transparent;
border-bottom: 3.125em solid #e8ebf0;
right: -0.77em;
}
.base > div {
position: absolute;
}
.grey-shadow {
width: 5.625em;
height: 0.750em;
background: #d8dbe1;
top: 0;
}
.grey-shadow:before {
border-left: 3px solid transparent;
border-right: 0px solid transparent;
border-bottom: 0.75em solid #d8dbe1;
left: -3px;
}
.grey-shadow:after {
border-right: 3px solid transparent;
border-left: 0px solid transparent;
border-bottom: 0.75em solid #d8dbe1;
right: -2px;
z-index: 1;
}
.foot {
background: #e8ebf0;
}
.foot.top {
width: 7.250em;
height: 0.313em;
bottom: -0.3em;
left: 50%;
margin-left: -3.625em;
}
.foot.top:before,
.foot.top:after,
.foot.bottom:before {
content: "";
position: absolute;
top: 0px;
}
.foot.top:before {
border-left: 16px solid transparent;
border-right: 0px solid transparent;
border-bottom: 5px solid #e8ebf0;
left: -16px;
}
.foot.top:after {
border-right: 1em solid transparent;
border-left: 0px solid transparent;
border-bottom: 5px solid #e8ebf0;
right: -1em;
}
.foot.bottom {
width: 9.375em;
height: 0.313em;
bottom: -0.625em;
left: 50%;
margin-left: -4.688em;
}
.laptop {
width: 14.688em;
height: 9.688em;
background: #f8f8f8;
border: 0.75em solid #1f1f1f;
-webkit-border-radius:10px 10px 0 0;
-moz-border-radius:10px 10px 0 0;
border-radius:10px 10px 0 0;
position: absolute;
top: 14.5em;
right: 1.875em;
z-index: 10;
}
.laptop:before {
top: -0.3em;
}
.laptop > div {
position: absolute;
}
.laptop > .screenz {
width: 13.188em;
height: 8.188em;
left: 0;
margin-left: 0;
background: #fff;
overflow: hidden;
}
.btm {
width: 18.500em;
height: 0.625em;
bottom: -1.188em;
left: 50%;
margin-left: -9.25em;
-webkit-border-radius:0 0 20px 20px;
-moz-border-radius:0 0 20px 20px;
border-radius:0 0 20px 20px;
background: #e8ebf0;
z-index: 1;
}
.btm:before {
content: "";
position: absolute;
width: 42px;
height: 4px;
left: 50%;
top: 0;
margin-left: -21px;
-webkit-border-radius:0 0 5px 5px;
-moz-border-radius:0 0 5px 5px;
border-radius:0 0 5px 5px;
background: #d8dbe1;
}
.btm:after {
display: none;
content: "";
position: absolute;
width: 100%;
height: 0.25rem;
background: #bababa;
top: .5rem;
border-bottom-right-radius: 7.5rem 2.5rem;
border-bottom-left-radius: 7.5rem 2.5rem;
}
.phone {
width: 4.125em;
height: 8.750em;
position: absolute;
top: 15.75em;
left: 1em;
#include border-radius(0.5em);
background: #1f1f1f;
border: 1.563em solid #1f1f1f;
border-left: 0.313em solid #1f1f1f;
border-right: 0.313em solid #1f1f1f;
}
.phone:before,
.phone:after {
content: "";
position: absolute;
left: 50%;
background: #474e5d;
}
.phone:before {
background: #474e5d;
width: 1.250em;
height: 0.250em;
margin-left: -0.625em;
top: -0.75em;
#include border-radius(2px);
}
.phone:after {
width: 0.625em;
height: 0.625em;
#include border-radius(0.625em);
bottom: -1.125em;
margin-left: -0.313em;
}
.phone .screenz {
width: 3.50em;
height: 5.625em;
margin: 0 auto;
position: relative;
overflow: hidden;
background: #fff;
}
.ipad {
width: 8.75em;
height: 12.750em;
position: absolute;
top: 11.7em;
left: 6em;
#include border-radius(0.5em);
background: #1f1f1f;
border: 1.563em solid #1f1f1f;
border-left: 0.313em solid #1f1f1f;
border-right: 0.313em solid #1f1f1f;
}
.ipad:before,
.ipad:after {
content: "";
position: absolute;
left: 50%;
background: #474e5d;
}
.ipad:before {
background: #474e5d;
width: 1.250em;
height: 0.250em;
margin-left: -0.625em;
top: -0.75em;
#include border-radius(2px);
}
.ipad:after {
width: 0.625em;
height: 0.625em;
#include border-radius(0.625em);
bottom: -1.125em;
margin-left: -0.313em;
}
.ipad .screenz {
width: 8em;
height: 9.8em;
margin: 0 auto;
position: relative;
overflow: hidden;
background: #fff;
}
.ipad .content {
width: 100%;
left: 0%;
margin-left: 0px;
}
.monitor , .laptop, .ipad, .phone {
overflow: hidden;
img {
padding: 0 !important;
width: 100%;
height: 880px;
-webkit-animation:scroll 4s 1s cubic-bezier(0.25, 0.1, 0.25, 1) infinite;
-moz-animation:scroll 4s 1s cubic-bezier(0.25, 0.1, 0.25, 1) infinite;
-ms-animation:scroll 4s 1s cubic-bezier(0.25, 0.1, 0.25, 1) infinite;
-o-animation:scroll 4s 1s cubic-bezier(0.25, 0.1, 0.25, 1) infinite;
animation:scroll 4s 1s cubic-bezier(0.25, 0.1, 0.25, 1) infinite;
&:hover {
opacity: 1 !important;
}
}
}
#media screen and (min-width: 38em) {
.service-graphic {
font-size: 12px;
.monitor {
border: 1.25em solid #1f1f1f;
}
}
}
Original unmodified codepen :
http://codepen.io/nicholaspetersen/pen/BHjfk
So what I did was, I converted the LESS to CSS (since I do not know LESS) using
http://less2css.org/
The animation worked perfectly for Firefox, however on Chrome it did not. So I went through the code and added all the missing prefixes, as you can see in the CSS code I provided and it still does not work. I am now clueless, why will this work on Firefox but not Chrome?
Thanks
It's not enough to just add the prefixed transformations inside of a keyframe animation, you need to prefix the keyframe declaration itself as well. For example:
#-webkit-keyframes foo {
0% {
-webkit-transform: scale(0);
}
100% {
-webkit-transform: scale(1);
}
}
Also worth noting, you can view the compiled LESS in codepen by clicking on the 'eye' icon in the CSS pane. Hope this helps bud