delay css class property when js is disabled - html

I am working on a project. I want to run some css property after 4000 ms. I want to run this only when javascript is disabled(if js is enabled, It will remove that class.).
How can I do this. Is it possible? If not any other solution?
Thanks for help in advance.

I didn't find any answer on web. So I tried last 3 days only for this and finally I got the solution. Here is the solution:
$(window).load(function() {
$(".loader").delay(3000).fadeOut(500, function() {
$(".main-cont").hide();
});
})
body {
margin: 0px;
padding: 0px;
background-color: #4CAF50;
color: #FFF;
font-family: arial;
font-size: 20px;
}
.main-cont {
background-color: #3F51B5;
width: 100vw;
height: 100vh;
display: inline-block;
padding-top: calc(50vh - 20px);
position: fixed;
text-align: center;
line-height: 20px;
opacity: 0;
-webkit-animation: css-delay 0ms infinite ease-in-out;
-moz-animation: css-delay 0ms infinite ease-in-out;
-ms-animation: css-delay 0ms infinite ease-in-out;
-o-animation: css-delay 0ms infinite ease-in-out;
-khtml-animation: css-delay 0ms infinite ease-in-out;
animation: css-delay 0ms infinite ease-in-out;
-webkit-animation-iteration-count: 1; /* Chrome, Safari, Opera */
animation-iteration-count: 1;
animation-delay : 10s; /* time for delay animation */
-webkit-animation-fill-mode: forwards;
animation-fill-mode: forwards;
}
.cont {
text-align: center;
display: block;
line-height: 20px;
padding-top: calc(50vh - 20px);
}
#keyframes css-delay {
0% {
opacity: 0;
display: none;
}
100% {
opacity: 1;
display: block;
}
}
/* this is only for loading animation */
.loader {
height: 100vh;
width: 100%;
display: inline-block;
/* display: none; */
position: fixed;
z-index: 0;
background-color: #333;
}
.sk-circle {
margin: 100px auto;
width: 40px;
height: 40px;
position: relative;
}
.sk-circle .sk-child {
width: 100%;
height: 100%;
position: absolute;
left: 0;
top: 0;
}
.sk-circle .sk-child:before {
content: '';
display: block;
margin: 0 auto;
width: 15%;
height: 15%;
background-color: #FFF;
border-radius: 100%;
-webkit-animation: sk-circleBounceDelay 1.2s infinite ease-in-out both;
animation: sk-circleBounceDelay 1.2s infinite ease-in-out both;
}
.sk-circle .sk-circle2 {
-webkit-transform: rotate(30deg);
-ms-transform: rotate(30deg);
transform: rotate(30deg); }
.sk-circle .sk-circle3 {
-webkit-transform: rotate(60deg);
-ms-transform: rotate(60deg);
transform: rotate(60deg); }
.sk-circle .sk-circle4 {
-webkit-transform: rotate(90deg);
-ms-transform: rotate(90deg);
transform: rotate(90deg); }
.sk-circle .sk-circle5 {
-webkit-transform: rotate(120deg);
-ms-transform: rotate(120deg);
transform: rotate(120deg); }
.sk-circle .sk-circle6 {
-webkit-transform: rotate(150deg);
-ms-transform: rotate(150deg);
transform: rotate(150deg); }
.sk-circle .sk-circle7 {
-webkit-transform: rotate(180deg);
-ms-transform: rotate(180deg);
transform: rotate(180deg); }
.sk-circle .sk-circle8 {
-webkit-transform: rotate(210deg);
-ms-transform: rotate(210deg);
transform: rotate(210deg); }
.sk-circle .sk-circle9 {
-webkit-transform: rotate(240deg);
-ms-transform: rotate(240deg);
transform: rotate(240deg); }
.sk-circle .sk-circle10 {
-webkit-transform: rotate(270deg);
-ms-transform: rotate(270deg);
transform: rotate(270deg); }
.sk-circle .sk-circle11 {
-webkit-transform: rotate(300deg);
-ms-transform: rotate(300deg);
transform: rotate(300deg); }
.sk-circle .sk-circle12 {
-webkit-transform: rotate(330deg);
-ms-transform: rotate(330deg);
transform: rotate(330deg); }
.sk-circle .sk-circle2:before {
-webkit-animation-delay: -1.1s;
animation-delay: -1.1s; }
.sk-circle .sk-circle3:before {
-webkit-animation-delay: -1s;
animation-delay: -1s; }
.sk-circle .sk-circle4:before {
-webkit-animation-delay: -0.9s;
animation-delay: -0.9s; }
.sk-circle .sk-circle5:before {
-webkit-animation-delay: -0.8s;
animation-delay: -0.8s; }
.sk-circle .sk-circle6:before {
-webkit-animation-delay: -0.7s;
animation-delay: -0.7s; }
.sk-circle .sk-circle7:before {
-webkit-animation-delay: -0.6s;
animation-delay: -0.6s; }
.sk-circle .sk-circle8:before {
-webkit-animation-delay: -0.5s;
animation-delay: -0.5s; }
.sk-circle .sk-circle9:before {
-webkit-animation-delay: -0.4s;
animation-delay: -0.4s; }
.sk-circle .sk-circle10:before {
-webkit-animation-delay: -0.3s;
animation-delay: -0.3s; }
.sk-circle .sk-circle11:before {
-webkit-animation-delay: -0.2s;
animation-delay: -0.2s; }
.sk-circle .sk-circle12:before {
-webkit-animation-delay: -0.1s;
animation-delay: -0.1s; }
#-webkit-keyframes sk-circleBounceDelay {
0%, 80%, 100% {
-webkit-transform: scale(0);
transform: scale(0);
} 40% {
-webkit-transform: scale(1);
transform: scale(1);
}
}
#keyframes sk-circleBounceDelay {
0%, 80%, 100% {
-webkit-transform: scale(0);
transform: scale(0);
} 40% {
-webkit-transform: scale(1);
transform: scale(1);
}
}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
<div class="loader">
<div class="sk-circle">
<div class="sk-circle1 sk-child"></div>
<div class="sk-circle2 sk-child"></div>
<div class="sk-circle3 sk-child"></div>
<div class="sk-circle4 sk-child"></div>
<div class="sk-circle5 sk-child"></div>
<div class="sk-circle6 sk-child"></div>
<div class="sk-circle7 sk-child"></div>
<div class="sk-circle8 sk-child"></div>
<div class="sk-circle9 sk-child"></div>
<div class="sk-circle10 sk-child"></div>
<div class="sk-circle11 sk-child"></div>
<div class="sk-circle12 sk-child"></div>
</div>
</div>
<div class="main-cont">
<a>please enable javascript on your browser.<br>
(uncomment out all js to see content.)
</a>
</div>
<div class="cont">
<a>all of youre contents.<br>
(just comment out all js to see result.)
</a>
</div>

Related

how to add pulse animation with one after other in css like traffic lights blinks continously

I have two circles with pulse animation infinite times. Now I need animating the circle one after another continuously with infinite times. I tried pulsation the circle infinite times. I have added delay animation but it is not working I don't why. Please kindly refer the code and help to achieve that functionality:
HTML:
<div class="inner">one</div>
<div class="inner1">two</div>
Css:
.inner {
width: 74px;
height: 74px;
background: #fff;
border:1px solid #000;
position: relative;
text-align:center;
border-radius: 50%;
margin-bottom:20px;
text-align: center;
-webkit-animation: pulse 1s infinite;
}
.inner1 {
width: 74px;
height: 74px;
background: #fff;
border:1px solid #000;
position: relative;
border-radius: 50%;
text-align: center;
-webkit-animation: pulse 2s infinite;
}
#-webkit-keyframes pulse {
0% {
-webkit-transform: scaleX(1);
transform: scaleX(1)
}
50% {
-webkit-transform: scale3d(1.05, 1.05, 1.05);
transform: scale3d(1.05, 1.05, 1.05)
}
to {
-webkit-transform: scaleX(1);
transform: scaleX(1)
}
}
#keyframes pulse {
0% {
-webkit-transform: scaleX(1);
transform: scaleX(1)
}
50% {
-webkit-transform: scale3d(1.05, 1.05, 1.05);
transform: scale3d(1.05, 1.05, 1.05)
}
to {
-webkit-transform: scaleX(1);
transform: scaleX(1)
}
}
.pulse {
-webkit-animation-name: pulse;
animation-name: pulse
}
thanks in advance
You can add the same class to all circles for common properties. The only properties you need different for each is animation-delay.
You can use a small jQuery code to set that for any number of divs. I have created an example for 3 divs, but feel free to extend it.
let els = $(".inner"),
length = $(".inner").length
els.each(function(index) {
$(this).css('animation-delay', (index / length) + 's')
})
.inner {
display: inline-block;
vertical-align: top;
width: 74px;
height: 74px;
background: #fff;
border: 1px solid #000;
position: relative;
text-align: center;
border-radius: 50%;
margin-bottom: 20px;
text-align: center;
margin: 10px;
animation: pulse 1s infinite linear;
}
#keyframes pulse {
0% {
transform: scaleX(1)
}
50% {
transform: scale3d(1.05, 1.05, 1.05)
}
to {
transform: scaleX(1)
}
}
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<div class="inner">one</div>
<div class="inner">two</div>
<div class="inner">three</div>
animation-delay is working:
.inner {
width: 74px;
height: 74px;
background: #fff;
border: 1px solid #000;
position: relative;
text-align: center;
border-radius: 50%;
margin-bottom: 20px;
text-align: center;
-webkit-animation: pulse 1s infinite;
}
.inner1 {
width: 74px;
height: 74px;
background: #fff;
border: 1px solid #000;
position: relative;
border-radius: 50%;
text-align: center;
-webkit-animation: pulse 2s infinite;
animation-delay: 5s
}
#-webkit-keyframes pulse {
0% {
-webkit-transform: scaleX(1);
transform: scaleX(1)
}
50% {
-webkit-transform: scale3d(1.05, 1.05, 1.05);
transform: scale3d(1.05, 1.05, 1.05)
}
to {
-webkit-transform: scaleX(1);
transform: scaleX(1)
}
}
#keyframes pulse {
0% {
-webkit-transform: scaleX(1);
transform: scaleX(1)
}
50% {
-webkit-transform: scale3d(1.05, 1.05, 1.05);
transform: scale3d(1.05, 1.05, 1.05)
}
to {
-webkit-transform: scaleX(1);
transform: scaleX(1)
}
}
.pulse {
-webkit-animation-name: pulse;
animation-name: pulse
}
<div class="inner">one
</div>
<div class="inner1">two
</div>
Only Add animation Delay= .5s; and reduce second animation time with 1s
HTML:
<div class="inner">one</div>
<div class="inner1">two</div>
CSS:
.inner {
width: 74px;
height: 74px;
background: #fff;
border:1px solid #000;
position: relative;
text-align:center;
border-radius: 50%;
margin-bottom:20px;
text-align: center;
-webkit-animation: pulse 1s infinite;
}
.inner1 {
width: 74px;
height: 74px;
background: #fff;
border:1px solid #000;
position: relative;
border-radius: 50%;
text-align: center;
-webkit-animation: pulse 1s infinite;
animation-delay: .5s;
}
#-webkit-keyframes pulse {
0% {
-webkit-transform: scaleX(1);
transform: scaleX(1)
}
50% {
-webkit-transform: scale3d(1.05, 1.05, 1.05);
transform: scale3d(1.05, 1.05, 1.05)
}
to {
-webkit-transform: scaleX(1);
transform: scaleX(1)
}
}
#keyframes pulse {
0% {
-webkit-transform: scaleX(1);
transform: scaleX(1)
}
50% {
-webkit-transform: scale3d(1.05, 1.05, 1.05);
transform: scale3d(1.05, 1.05, 1.05)
}
to {
-webkit-transform: scaleX(1);
transform: scaleX(1)
}
}
.pulse {
-webkit-animation-name: pulse;
animation-name: pulse
}

Can't animate a card opening

I am trying to animate a frame where the 'heart-flap' opens to the left. But can't seem to do it -- the axis of the box and the heart is not the same while opening.
My jsFiddle https://jsfiddle.net/dk1446/unjqx08d/2/
#import url(https://fonts.googleapis.com/css?family=Poiret+One);
body {
background-color: white;
font-family: 'Poiret One', Segoe UI Light, cursive;
}
.heart {
background-color: #d32f2f;
display: inline-block;
height: 200px;
margin: 0 10px;
position: relative;
top: 0;
/* transform: rotate(-45deg); */
width: 200px;
margin-top: 200px;
margin-left: 500px;
/* transform: rotate(0deg); */
}
.heart:before,
.heart:after {
content: "";
background-color: #d32f2f;
border-radius: 50%;
height: 200px;
position: absolute;
width: 200px;
}
.heart:before {
top: -110px;
left: 0;
}
.heart:after {
left: 110px;
top: 0;
}
#card {
margin-top: 200px;
}
#message {
height: 400px;
width: 400px;
margin-top: -410px;
margin-left: 500px;
background-color: #333;
color: white;
border: 3px dashed violet;
border-radius: 35% 0 35% 0;
}
#card #heart1 {
-webkit-transform: rotate(180deg);
-moz-transform: rotate(180deg);
-ms-transform: rotate(180deg);
transform: rotate(180deg);
-webkit-animation: closeLeft 2s ease-in-out forwards;
-moz-animation: closeLeft 2s ease-in-out forwards;
-ms-animation: closeLeft 2s ease-in-out forwards;
animation: closeLeft 2s ease-in-out forwards;
}
#card:hover #heart1 {
-webkit-animation: openLeft 2s ease-in-out forwards;
-moz-animation: openLeft 2s ease-in-out forwards;
-ms-animation: openLeft 2 ease-in-out forwards;
animation: openLeft 2s ease-in-out forwards;
}
#-webkit-keyframes closeLeft {
from {
-webkit-transform: rotateY(0deg);
}
to {
-webkit-transform: rotateY(180deg);
}
}
#-moz-keyframes closeLeft {
from {
-moz-transform: rotateY(0deg);
}
to {
-moz-transform: rotateY(180deg);
}
}
#-ms-keyframes closeLeft {
from {
-ms-transform: rotateY(0deg);
}
to {
-ms-transform: rotateY(180deg);
}
}
#keyframes closeLeft {
from {
transform: rotateY(0deg);
}
to {
transform: rotateY(180deg);
}
}
#-moz-keyframes openLeft {
from {
-moz-transform: rotateY(180deg);
}
to {
-moz-transform: rotateY(0deg);
}
}
#-webkit-keyframes openLeft {
from {
-webkit-transform: rotateY(180deg);
}
to {
-webkit-transform: rotateY(0deg);
}
}
#-ms-keyframes openLeft {
from {
-ms-transform: rotateY(180deg);
}
to {
-ms-transform: rotateY(0deg);
}
}
#keyframes openLeft {
from {
transform: rotateY(180deg);
}
to {
transform: rotateY(0deg);
}
}
<div id="card">
<div class="heart" id="heart1"></div>
<div id="message">
<h2>Happy Valentines Day</h2>
</div>
<!-- <div class="heart" id="heart2"></div> -->
</div>
I would like the 'heart' to open to the left and close right. It should be in line with the box underneath. I can't seem to figure out a way.
You almost had it! You need to add transform-origin: 0 0 to the #heart1
#import url(https://fonts.googleapis.com/css?family=Poiret+One);
body {
background-color: white;
font-family: 'Poiret One', Segoe UI Light, cursive;
}
.heart {
background-color: #d32f2f;
display: inline-block;
height: 200px;
margin: 0 10px;
position: relative;
top: 0;
/* transform: rotate(-45deg); */
width: 200px;
margin-top: 200px;
margin-left: 500px;
/* transform: rotate(0deg); */
}
.heart:before,
.heart:after {
content: "";
background-color: #d32f2f;
border-radius: 50%;
height: 200px;
position: absolute;
width: 200px;
}
.heart:before {
top: -110px;
left: 0;
}
.heart:after {
left: 110px;
top: 0;
}
#card {
margin-top: 200px;
}
#message {
height: 400px;
width: 400px;
margin-top: -410px;
margin-left: 500px;
background-color: #333;
color: white;
border: 3px dashed violet;
border-radius: 35% 0 35% 0;
}
#card #heart1 {
-webkit-transform: rotate(180deg);
-moz-transform: rotate(180deg);
-ms-transform: rotate(180deg);
transform: rotate(180deg);
-webkit-animation: closeLeft 2s ease-in-out forwards;
-moz-animation: closeLeft 2s ease-in-out forwards;
-ms-animation: closeLeft 2s ease-in-out forwards;
animation: closeLeft 2s ease-in-out forwards;
transform-origin: 0 0;
}
#card:hover #heart1 {
-webkit-animation: openLeft 2s ease-in-out forwards;
-moz-animation: openLeft 2s ease-in-out forwards;
-ms-animation: openLeft 2 ease-in-out forwards;
animation: openLeft 2s ease-in-out forwards;
}
#-webkit-keyframes closeLeft {
from {
-webkit-transform: rotateY(0deg);
}
to {
-webkit-transform: rotateY(180deg);
}
}
#-moz-keyframes closeLeft {
from {
-moz-transform: rotateY(0deg);
}
to {
-moz-transform: rotateY(180deg);
}
}
#-ms-keyframes closeLeft {
from {
-ms-transform: rotateY(0deg);
}
to {
-ms-transform: rotateY(180deg);
}
}
#keyframes closeLeft {
from {
transform: rotateY(0deg);
}
to {
transform: rotateY(180deg);
}
}
#-moz-keyframes openLeft {
from {
-moz-transform: rotateY(180deg);
}
to {
-moz-transform: rotateY(0deg);
}
}
#-webkit-keyframes openLeft {
from {
-webkit-transform: rotateY(180deg);
}
to {
-webkit-transform: rotateY(0deg);
}
}
#-ms-keyframes openLeft {
from {
-ms-transform: rotateY(180deg);
}
to {
-ms-transform: rotateY(0deg);
}
}
#keyframes openLeft {
from {
transform: rotateY(180deg);
}
to {
transform: rotateY(0deg);
}
}
<div id="card">
<div class="heart" id="heart1"></div>
<div id="message">
<h2>Happy Valentines Day</h2>
</div>
<!-- <div class="heart" id="heart2"></div> -->
</div>
Here's the fiddle: https://jsfiddle.net/disinfor/y0p2t94q/1/
Edit for more info: the default origin for an element is 50% 50% 0 - which translates to the middle of the element. 0 0 moves the point of origin to the top left corner.
More reading: https://www.w3schools.com/cssref/css3_pr_transform-origin.asp
#rorschach: finally you got the animation, but did you notice your card area yet it's not sorted out!! when you hover on the card the animation should start I guess, so I think either you set max-width to the card.

cant make a smooth rotation in rotate css

I'm trying to make a smooth landing with a rocket, but I'm not being able to do the rotation to make the position for landing in a smooth manner, could u guys please help me on this part of the code?
#keyframes rocket{
0%{
transform:translate(-10vw);
}
40%{
transform:translate(40vw);
}
70%{
transform:translate(70vw, -15vw) rotate(-90deg);
}
100%{
transform:translate(70vw, 0) rotate(-90deg);
}
}
.rocketA{
margin-top: 150px;
width: 80px;
height: 40px;
background-color: pink;
animation-name: rocket;
animation-duration: 4s;
animation-timing-function: ease-in-out;
animation-delay: 0s;
animation-iteration-count: 1;
animation-direction: normal;
-webkit-animation-fill-mode: forwards;
}
<div class='rocketA'></div>
If anyone finds this helpful here it goes the solution I found to make it better, thank for all the help.
SOLUTION
#keyframes rocket {
0% {
transform: translate(-10vw);
}
52% {
transform: translate(45vw);
}
52% {
transform: translate(45vw, -0vw) rotate(-5deg);
}
54% {
transform: translate(48vw, -0.5vw) rotate(-10deg);
}
56% {
transform: translate(51vw, -1vw) rotate(-15deg);
}
58% {
transform: translate(54vw, -1.5vw) rotate(-20deg);
}
60% {
transform: translate(57vw, -2vw) rotate(-25deg);
}
62% {
transform: translate(60vw, -2.5vw) rotate(-30deg);
}
64% {
transform: translate(63vw, -3vw) rotate(-35deg);
}
66% {
transform: translate(66vw, -3.5vw) rotate(-40deg);
}
68% {
transform: translate(69vw, -4vw) rotate(-45deg);
}
70% {
transform: translate(72vw, -4.5vw) rotate(-50deg);
}
72% {
transform: translate(75vw, -5vw) rotate(-55deg);
}
74% {
transform: translate(78vw, -5.5vw) rotate(-60deg);
}
76% {
transform: translate(81vw, -6vw) rotate(-65deg);
}
78% {
transform: translate(83vw, -6.5vw) rotate(-70deg);
}
80% {
transform: translate(85vw, -7vw) rotate(-75deg);
}
82% {
transform: translate(88vw, -7.5vw) rotate(-80deg);
}
84% {
transform: translate(91vw, -8.5vw) rotate(-85deg);
}
86%, 96% {
transform: translate(94vw, -9vw) rotate(-90deg);
}
96%, 100% {
transform: translate(94vw, 0) rotate(-90deg);
}
}
.rocketA {
margin-top: 100px;
width: 80px;
height: 40px;
background-color: pink;
animation-name: rocket;
animation-duration: 5s;
animation-timing-function: linear;
animation-delay: 0s;
animation-iteration-count: 1;
animation-direction: normal;
-webkit-animation-fill-mode: forwards;
}
<div class='rocketA'></div>
Use animation-timing-function: linear;
Demo
#keyframes rocket{
0%{
transform:translate(-10vw);
}
40%{
transform:translate(40vw);
}
70%{
transform:translate(70vw, -15vw) rotate(-90deg);
}
100%{
transform:translate(70vw, 5vw) rotate(-90deg);
}
}
.rocketA{
margin-top: 150px;
width: 80px;
height: 40px;
background-color: pink;
animation-name: rocket;
animation-duration: 4s;
animation-timing-function: linear;
animation-delay: 0s;
animation-iteration-count: 1;
animation-direction: normal;
-webkit-animation-fill-mode: forwards;
}
<div class='rocketA'></div>

Safari Webkit Transitions don't work

I have struggling to understand why my circle animation for my website works perfectly for browsers such as Chrome, IE, Opera, and Firefox, but fails to work for Safari.
JSFiddle
Website
.circle {
width: 45%;
}
.circle:after {
content: "";
display: block;
width: 100%;
height: 0;
padding-bottom: 100%;
-moz-border-radius: 50%;
-webkit-border-radius: 50%;
border-radius: 50%;
}
.circle div {
float: left;
width: 100%;
padding-top: 50%;
line-height: 40px;
margin-top: -20px;
text-align: center;
}
.circle div span {
font-size: 50px;
}
.circle .desc {
font-size: 20px;
line-height: 29px;
text-align: center;
}
#left:hover {
animation: sway 2s infinite ease-in-out;
-webkit-animation: sway 2s infinite ease-in-out;
-moz-animation: sway 2s infinite ease-in-out;
-o-animation: sway 2s infinite ease-in-out;
}
#right:hover {
animation: swayClock 2s infinite ease-in-out;
-webkit-animation: swayClock 2s infinite ease-in-out;
-moz-animation: swayClock 2s infinite ease-in-out;
-o-animation: swayClock 2s infinite ease-in-out;
}
#keyframes sway {
0% {
transform: rotate(0deg);
}
100% { transform: rotate(-360deg);
-webkit-transform: -webkit-rotate(-360deg);
-ms-transform: -ms-rotate(-360deg);
-moz-transform: -moz-rotate(-360deg);
-o-transform: -o-rotate(-360deg);
}
}
#-webkit-keyframes sway {
0% {
transform: rotate(0deg);
}
100% { transform: rotate(-360deg);
-webkit-transform: -webkit-rotate(-360deg);
-ms-transform: -ms-rotate(-360deg);
-moz-transform: -moz-rotate(-360deg);
-o-transform: -o-rotate(-360deg);
}
}
#keyframes swayClock {
0% {
transform: rotate(0deg);
}
100% { transform: rotate(360deg);
-webkit-transform: -webkit-rotate(360deg);
-ms-transform: -ms-rotate(360deg);
-moz-transform: -moz-rotate(360deg);
-o-transform: -o-rotate(360deg);}
}
#-webkit-keyframes swayClock {
0% {
transform: rotate(0deg);
}
100% { transform: rotate(360deg);
-webkit-transform: -webkit-rotate(360deg);
-ms-transform: -ms-rotate(360deg);
-moz-transform: -moz-rotate(360deg);
-o-transform: -o-rotate(360deg);}
}
#left {
float: left;
padding-right: 5%;
}
#left:after {
border: 1px solid #2E8AE6;
}
#right {
float: right;
padding-left: 5%;
}
#right:after {
border: 1px solid #FF9900;
}
<div class="circle" id="left"><div><span>Coding</span><br><p class="desc">I am a strong programmer in <i>Python</i>, <i>Java</i>, <i>Processing</i>, and <i>front-end web development</i>.</p></div></div>
<div class="circle" id="right"><div><span>Design</span><p class="desc">I have experience in designing <i>sleek</i>, <i>responsive</i> layouts with <i>powerful functionality</i></p></div></div>
Fixed your code:
JSFiddle
.circle {
width: 45%;
}
.circle:after {
content: '';
display: block;
width: 100%;
height: 0;
padding-bottom: 100%;
-webkit-border-radius: 50%;
-moz-border-radius: 50%;
border-radius: 50%;
}
.circle div {
float: left;
width: 100%;
padding-top: 50%;
line-height: 40px;
margin-top: -20px;
text-align: center;
}
.circle div span {
font-size: 50px;
}
.circle .desc {
font-size: 20px;
line-height: 29px;
text-align: center;
}
#left:hover {
-webkit-animation: sway 2s infinite ease-in-out;
-moz-animation: sway 2s infinite ease-in-out;
-o-animation: sway 2s infinite ease-in-out;
animation: sway 2s infinite ease-in-out;
}
#right:hover {
animation: swayClock 2s infinite ease-in-out;
-webkit-animation: swayClock 2s infinite ease-in-out;
-moz-animation: swayClock 2s infinite ease-in-out;
-o-animation: swayClock 2s infinite ease-in-out;
}
#keyframes sway {
0% {
transform: rotate(0deg);
}
100% {
-webkit-transform: rotate(-360deg);
-moz-transform: rotate(-360deg);
-ms-transform: rotate(-360deg);
-o-transform: rotate(-360deg);
transform: rotate(-360deg);
}
}
#-webkit-keyframes sway {
0% {
transform: rotate(0deg);
}
100% {
-webkit-transform: rotate(-360deg);
-moz-transform: rotate(-360deg);
-ms-transform: rotate(-360deg);
-o-transform: rotate(-360deg);
transform: rotate(-360deg);
}
}
#keyframes swayClock {
0% {
transform: rotate(0deg);
}
100% {
-webkit-transform: rotate(360deg);
-moz-transform: rotate(360deg);
-ms-transform: rotate(360deg);
-o-transform: rotate(360deg);
transform: rotate(360deg);
}
}
#-webkit-keyframes swayClock {
0% {
transform: rotate(0deg);
}
100% {
-webkit-transform: rotate(360deg);
-ms-transform: rotate(360deg);
-moz-transform: rotate(360deg);
-o-transform: rotate(360deg);
transform: rotate(360deg);
}
}
#left {
float: left;
padding-right: 5%;
}
#left:after {
border: 1px solid #2E8AE6;
}
#right {
float: right;
padding-left: 5%;
}
#right:after {
border: 1px solid #FF9900;
}
<div class="circle" id="left">
<div>
<span>Coding</span>
<p class="desc">I am a strong programmer in <i>Python</i>, <i>Java</i>, <i>Processing</i>, and <i>front-end web
development</i>.
</p>
</div>
</div>
<div class="circle" id="right">
<div>
<span>Design</span>
<p class="desc">I have experience in designing <i>sleek</i>, <i>responsive</i> layouts with <i>powerful
functionality</i>
</p>
</div>
</div>
Be attentive — there no values: -webkit-rotate, -ms-rotate, -moz-rotate, -o-rotate. The latest versions of other browsers support non-prefixed property transform: rotate() and ignore others, but -webkit-transform: rotate() is needed for Safari.

Not able to change font HTML/CSS

For some reason, I am unable to change the font of any of my text on the website. I have a feeling something in one of the CSS files is overriding this. Here are some of my CSS files:
Style:
#import url("http://fonts.googleapis.com/css?family=Source+Sans+Pro:300,900");
#import url("font-awesome.min.css");
/* Basic */
body, input, select, textarea {
color: white;
font-size: 15pt;
font-weight: 300 !important;
letter-spacing: -0.025em;
line-height: 1.75em;
}
body {
}
body.loading * {
-moz-animation: none !important;
-webkit-animation: none !important;
-o-animation: none !important;
-ms-animation: none !important;
animation: none !important;
}
a {
-moz-transition: border-color 0.2s ease-in-out;
-webkit-transition: border-color 0.2s ease-in-out;
-o-transition: border-color 0.2s ease-in-out;
-ms-transition: border-color 0.2s ease-in-out;
transition: border-color 0.2s ease-in-out;
border-bottom: dotted 1px;
color: inherit;
outline: 0;
text-decoration: none;
}
a:hover {
border-color: transparent;
}
/* Icon */
.icon:before {
-moz-osx-font-smoothing: grayscale;
-webkit-font-smoothing: antialiased;
font-family: FontAwesome;
font-style: normal;
font-weight: normal;
text-transform: none !important;
}
.icon > .label {
display: none;
}
/* Wrapper */
#-moz-keyframes wrapper { 0% { opacity: 0; } 100% { opacity: 1; } }
#-webkit-keyframes wrapper { 0% { opacity: 0; } 100% { opacity: 1; } }
#-o-keyframes wrapper { 0% { opacity: 0; } 100% { opacity: 1; } }
#-ms-keyframes wrapper { 0% { opacity: 0; } 100% { opacity: 1; } }
#keyframes wrapper { 0% { opacity: 0; } 100% { opacity: 1; } }
/* BG */
/* Overlay */
#-moz-keyframes overlay { 0% { opacity: 0; } 100% { opacity: 1; } }
#-webkit-keyframes overlay { 0% { opacity: 0; } 100% { opacity: 1; } }
#-o-keyframes overlay { 0% { opacity: 0; } 100% { opacity: 1; } }
#-ms-keyframes overlay { 0% { opacity: 0; } 100% { opacity: 1; } }
#keyframes overlay { 0% { opacity: 0; } 100% { opacity: 1; } }
#overlay {
-moz-animation: overlay 1.5s 1.5s forwards;
-webkit-animation: overlay 1.5s 1.5s forwards;
-o-animation: overlay 1.5s 1.5s forwards;
-ms-animation: overlay 1.5s 1.5s forwards;
animation: overlay 1.5s 1.5s forwards;
background-attachment: fixed, fixed;
background-image: url("images/overlay-pattern.png"), url("images/bg.jpg");
background-position: top left, center center;
background-repeat: repeat, no-repeat;
background-size: auto, cover;
height: 100%;
left: 0;
opacity: 0;
position: fixed;
top: 0;
width: 100%;
}
/* Main */
#main {
height: 100%;
left: 0;
position: fixed;
text-align: center;
top: 0;
font-family: "Times New Roman";
width: 100%;
}
#main:before {
content: '';
display: inline-block;
height: 100%;
margin-right: 0;
vertical-align: middle;
width: 1px;
}
/* Header */
#-moz-keyframes header { 0% { -moz-transform: translate3d(0,1em,0); -webkit-transform: translate3d(0,1em,0); -o-transform: translate3d(0,1em,0); -ms-transform: translate3d(0,1em,0); transform: translate3d(0,1em,0); opacity: 0; } 100% { -moz-transform: translate3d(0,0,0); -webkit-transform: translate3d(0,0,0); -o-transform: translate3d(0,0,0); -ms-transform: translate3d(0,0,0); transform: translate3d(0,0,0); opacity: 1; } }
#-webkit-keyframes header { 0% { -moz-transform: translate3d(0,1em,0); -webkit-transform: translate3d(0,1em,0); -o-transform: translate3d(0,1em,0); -ms-transform: translate3d(0,1em,0); transform: translate3d(0,1em,0); opacity: 0; } 100% { -moz-transform: translate3d(0,0,0); -webkit-transform: translate3d(0,0,0); -o-transform: translate3d(0,0,0); -ms-transform: translate3d(0,0,0); transform: translate3d(0,0,0); opacity: 1; } }
#-o-keyframes header { 0% { -moz-transform: translate3d(0,1em,0); -webkit-transform: translate3d(0,1em,0); -o-transform: translate3d(0,1em,0); -ms-transform: translate3d(0,1em,0); transform: translate3d(0,1em,0); opacity: 0; } 100% { -moz-transform: translate3d(0,0,0); -webkit-transform: translate3d(0,0,0); -o-transform: translate3d(0,0,0); -ms-transform: translate3d(0,0,0); transform: translate3d(0,0,0); opacity: 1; } }
#-ms-keyframes header { 0% { -moz-transform: translate3d(0,1em,0); -webkit-transform: translate3d(0,1em,0); -o-transform: translate3d(0,1em,0); -ms-transform: translate3d(0,1em,0); transform: translate3d(0,1em,0); opacity: 0; } 100% { -moz-transform: translate3d(0,0,0); -webkit-transform: translate3d(0,0,0); -o-transform: translate3d(0,0,0); -ms-transform: translate3d(0,0,0); transform: translate3d(0,0,0); opacity: 1; } }
#keyframes header { 0% { -moz-transform: translate3d(0,1em,0); -webkit-transform: translate3d(0,1em,0); -o-transform: translate3d(0,1em,0); -ms-transform: translate3d(0,1em,0); transform: translate3d(0,1em,0); opacity: 0; } 100% { -moz-transform: translate3d(0,0,0); -webkit-transform: translate3d(0,0,0); -o-transform: translate3d(0,0,0); -ms-transform: translate3d(0,0,0); transform: translate3d(0,0,0); opacity: 1; } }
#-moz-keyframes nav-icons { 0% { -moz-transform: translate3d(0,1em,0); -webkit-transform: translate3d(0,1em,0); -o-transform: translate3d(0,1em,0); -ms-transform: translate3d(0,1em,0); transform: translate3d(0,1em,0); opacity: 0; } 100% { -moz-transform: translate3d(0,0,0); -webkit-transform: translate3d(0,0,0); -o-transform: translate3d(0,0,0); -ms-transform: translate3d(0,0,0); transform: translate3d(0,0,0); opacity: 1; } }
#-webkit-keyframes nav-icons { 0% { -moz-transform: translate3d(0,1em,0); -webkit-transform: translate3d(0,1em,0); -o-transform: translate3d(0,1em,0); -ms-transform: translate3d(0,1em,0); transform: translate3d(0,1em,0); opacity: 0; } 100% { -moz-transform: translate3d(0,0,0); -webkit-transform: translate3d(0,0,0); -o-transform: translate3d(0,0,0); -ms-transform: translate3d(0,0,0); transform: translate3d(0,0,0); opacity: 1; } }
#-o-keyframes nav-icons { 0% { -moz-transform: translate3d(0,1em,0); -webkit-transform: translate3d(0,1em,0); -o-transform: translate3d(0,1em,0); -ms-transform: translate3d(0,1em,0); transform: translate3d(0,1em,0); opacity: 0; } 100% { -moz-transform: translate3d(0,0,0); -webkit-transform: translate3d(0,0,0); -o-transform: translate3d(0,0,0); -ms-transform: translate3d(0,0,0); transform: translate3d(0,0,0); opacity: 1; } }
#-ms-keyframes nav-icons { 0% { -moz-transform: translate3d(0,1em,0); -webkit-transform: translate3d(0,1em,0); -o-transform: translate3d(0,1em,0); -ms-transform: translate3d(0,1em,0); transform: translate3d(0,1em,0); opacity: 0; } 100% { -moz-transform: translate3d(0,0,0); -webkit-transform: translate3d(0,0,0); -o-transform: translate3d(0,0,0); -ms-transform: translate3d(0,0,0); transform: translate3d(0,0,0); opacity: 1; } }
#keyframes nav-icons { 0% { -moz-transform: translate3d(0,1em,0); -webkit-transform: translate3d(0,1em,0); -o-transform: translate3d(0,1em,0); -ms-transform: translate3d(0,1em,0); transform: translate3d(0,1em,0); opacity: 0; } 100% { -moz-transform: translate3d(0,0,0); -webkit-transform: translate3d(0,0,0); -o-transform: translate3d(0,0,0); -ms-transform: translate3d(0,0,0); transform: translate3d(0,0,0); opacity: 1; } }
#header {
-moz-animation: header 1s 2.25s forwards;
-webkit-animation: header 1s 2.25s forwards;
-o-animation: header 1s 2.25s forwards;
-ms-animation: header 1s 2.25s forwards;
animation: header 1s 2.25s forwards;
-moz-backface-visibility: hidden;
-webkit-backface-visibility: hidden;
-o-backface-visibility: hidden;
-ms-backface-visibility: hidden;
backface-visibility: hidden;
-moz-transform: translate3d(0,0,0);
-webkit-transform: translate3d(0,0,0);
-o-transform: translate3d(0,0,0);
-ms-transform: translate3d(0,0,0);
transform: translate3d(0,0,0);
cursor: default;
display: inline-block;
opacity: 0;
position: relative;
text-align: center;
top: -1em;
vertical-align: middle;
width: 90%;
}
#header h1 {
font-size: 4.35em;
font-weight: 900;
letter-spacing: -0.035em;
line-height: 1em;
}
#FirstP{
margin-top: -120px;
font-size: 10px;
}
#Noah{
margin-right: 700px;
font-size: 10px;
}
#ThirdP{
margin-left: 700px;
margin-top: -120px;
font-size: 10px;
}
#FourthP{
font-size: 10px;
}
#FifthP{
margin-left:700px;
margin-top: -125px;
font-size: 10px
}
#SixthP{
margin-right: 700px;
margin-top: -115px;
font-size: 10px;
}
#header p {
font-size: 1.25em;
margin: 0.75em 0 0.25em 0;
opacity: 0.75;
}
#header nav {
margin: 1.5em 0 0 0;
}
#header nav li:nth-child(1) {
-moz-animation-delay: 2.5s;
-webkit-animation-delay: 2.5s;
-o-animation-delay: 2.5s;
-ms-animation-delay: 2.5s;
animation-delay: 2.5s;
}
#header nav li:nth-child(2) {
-moz-animation-delay: 2.75s;
-webkit-animation-delay: 2.75s;
-o-animation-delay: 2.75s;
-ms-animation-delay: 2.75s;
animation-delay: 2.75s;
}
#header nav li:nth-child(3) {
-moz-animation-delay: 3s;
-webkit-animation-delay: 3s;
-o-animation-delay: 3s;
-ms-animation-delay: 3s;
animation-delay: 3s;
}
#header nav li:nth-child(4) {
-moz-animation-delay: 3.25s;
-webkit-animation-delay: 3.25s;
-o-animation-delay: 3.25s;
-ms-animation-delay: 3.25s;
animation-delay: 3.25s;
}
#header nav li:nth-child(5) {
-moz-animation-delay: 3.5s;
-webkit-animation-delay: 3.5s;
-o-animation-delay: 3.5s;
-ms-animation-delay: 3.5s;
animation-delay: 3.5s;
}
#header nav li:nth-child(6) {
-moz-animation-delay: 3.75s;
-webkit-animation-delay: 3.75s;
-o-animation-delay: 3.75s;
-ms-animation-delay: 3.75s;
animation-delay: 3.75s;
}
#header nav li:nth-child(7) {
-moz-animation-delay: 4s;
-webkit-animation-delay: 4s;
-o-animation-delay: 4s;
-ms-animation-delay: 4s;
animation-delay: 4s;
}
#header nav li:nth-child(8) {
-moz-animation-delay: 4.25s;
-webkit-animation-delay: 4.25s;
-o-animation-delay: 4.25s;
-ms-animation-delay: 4.25s;
animation-delay: 4.25s;
}
#header nav li:nth-child(9) {
-moz-animation-delay: 4.5s;
-webkit-animation-delay: 4.5s;
-o-animation-delay: 4.5s;
-ms-animation-delay: 4.5s;
animation-delay: 4.5s;
}
#header nav li:nth-child(10) {
-moz-animation-delay: 4.75s;
-webkit-animation-delay: 4.75s;
-o-animation-delay: 4.75s;
-ms-animation-delay: 4.75s;
animation-delay: 4.75s;
}
#header nav a {
-webkit-tap-highlight-color: transparent;
-webkit-touch-callout: none;
border: 0;
display: inline-block;
}
#header nav a:before {
-moz-transition: all 0.2s ease-in-out;
-webkit-transition: all 0.2s ease-in-out;
-o-transition: all 0.2s ease-in-out;
-ms-transition: all 0.2s ease-in-out;
transition: all 0.2s ease-in-out;
border-radius: 100%;
border: solid 1px white;
display: block;
font-size: 1.75em;
height: 2.5em;
line-height: 2.5em;
position: relative;
text-align: center;
top: 0;
width: 2.5em;
}
#header nav a:hover:before {
background-color: rgba(255, 255, 255, 0.175);
color: white;
}
#header nav a:active {
font-size: 0.95em;
background: none;
}
#header nav a:active:before {
background-color: rgba(255, 255, 255, 0.35);
color: white;
}
#header nav a span {
display: none;
}
#footer {
background-image: -moz-linear-gradient(top, rgba(0,0,0,0), rgba(0,0,0,0.5) 75%);
background-image: -webkit-linear-gradient(top, rgba(0,0,0,0), rgba(0,0,0,0.5) 75%);
background-image: -o-linear-gradient(top, rgba(0,0,0,0), rgba(0,0,0,0.5) 75%);
background-image: -ms-linear-gradient(top, rgba(0,0,0,0), rgba(0,0,0,0.5) 75%);
background-image: linear-gradient(top, rgba(0,0,0,0), rgba(0,0,0,0.5) 75%);
cursor: default;
height: 6em;
left: 0;
line-height: 8em;
width: 100%;
}`
Perhaps your text is inside the #main div hence getting the times new roman font? Hard to tell without the markup but it does'nt seem like there's an error with font import-
Tried with the top part of your css to set font to source sans pro like so:
p {
font-family:'source sans pro'
}
which seems to work: http://jsfiddle.net/61uzrL80/