Back text disappears when circle flips - html

Hi so Im trying to get a circle to flip when I hover over it. As of now, the circle flips and changes color, but once the animation finishes the text on the reverse side of the circle disappears.
.header{
perspective: 700px;
}
body, html {
background: url(bg.jpg);
background-size: 110px 69px;
font-family: 'Playfair Display', serif;
}
body{
/*background-color: #ccf2ff;*/
background-color: #99ebff;
}
#-webkit-keyframes magnify {
from {background-color: #00e699; }
to {background-color: #00cc99;}
}
.header h1:hover{
/*background-color: #00cc99;
-webkit-animation-name: magnify; /* Chrome, Safari, Opera */
/* -webkit-animation-duration: 0.5s; /* Chrome, Safari, Opera */
/*animation-name: magnify;
animation-duration: 0.5s;
-webkit-animation-fill-mode: forwards;*/
}
.name{
font-size: 16px
}
#-webkit-keyframes magnifytext {
from {font-size: 16px; }
to {font-size: 18px;}
}
.name:hover{
-webkit-animation-name: magnifytext; /* Chrome, Safari, Opera */
-webkit-animation-duration: 0.1s; /* Chrome, Safari, Opera */
animation-name: magnifytext;
animation-duration: 0.1s;
-webkit-animation-fill-mode: forwards;
}
body p {
font-style: italic;
font-size: 16px;
}
.card{
border-radius: 100%;
background-color: #00e699;
box-shadow: 0 2px 5px rgba(0,0,0,0.25);
height: 200px;
width: 200px;
margin: 60px auto 0;
text-align: center;
z-index: 0;
transition: all 0.6s ease;
transform-style: preserve-3d;
}
.front, .back{
backface-visibility:hidden;
}
.back{
position: relative;
top: -191px;
margin: 60px auto 0;
transform: rotateY(180deg);
}
.header h1 {
}
.card:hover {
background-color:#cc00cc;
transform: rotateY(180deg);
}
.header h1 span {
color:#fff;
display: block;
font-size: 30px;
padding: 65px 0 0 0;
}
.header h1 span+span {
color:#000;
display: block;
font-size: 28px;
padding: 0;
}
.main .container {
background:#fff;
box-shadow: 0 2px 5px rgba(0,0,0,0.05);
margin: -70px auto 80px;
padding: 80px;
z-index: 0;
}
h1 {
color: #444;
font-family: 'Oswald', sans-serif;
font-size: 16px;
margin: 20px 0 0 0;
text-align: center;
text-transform: uppercase;
}
h2 {
border-bottom: 1px solid #444;
color: #000;
font-family: 'Oswald', sans-serif;
margin: 20px 0 10px;
padding: 0 0 10px 0;
text-transform: uppercase;
}
h3 {
color: #00cc99;
font-family: 'Oswald', sans-serif;
margin: 10px 0 5px;
text-transform: uppercase;
}
.price p {
font-family: 'Oswald', sans-serif;
font-size: 20px;
font-style: normal;
margin: 26px 0 5px;
text-align: right;
}
<div class="header" ><!-- cardcontainer-->
<div class="card">
<div class="front">
<h1><span >Appointment Reminders</span></h1>
</div>
<div class="back">
<h1> <span style="position: relative; top: 10px;">Add patient<span></h1>
</div>
</div>
</div>
Thanks!

the problem is that you transform the "back"-div and on hover you try to transform the whole card, which transforms the front and the "back" divs once again. I hope this can help you:
<div class="header">
<div class = "card">
<div class = "front">
<h1><span >Appointment</span></h1>
</div>
<div class = "back">
<h1><span>Add patient</span></h1>
</div>
</div>
</div>
and the css:
.header{
perspective: 700px;
}
body{
background-color: #99ebff;
}
.card {
border-radius: 200px;
box-shadow: 0 2px 5px rgba(0,0,0,0.25);
height: 200px;
width: 200px;
margin: 60px auto 0;
text-align: center;
transition: all 0.6s ease;
transform-style: preserve-3d;
}
.front, .back{
position: absolute;
height: 100%;
width: 100%;
border-radius: 100%;
backface-visibility:hidden;
}
.front {
background-color: red;
}
.back{
background: green;
transform: rotateY(-180deg);
}
.card:hover {
transform: rotateY(180deg);
}
.header h1 span {
color:#fff;
display: block;
font-size: 16px;
padding: 65px 0 0 0;
}

Related

Div has no effect on outcome, doesnt read border and other similar properties, can't postion, when commented out has effect on included elements

I have removed irrelevant stuff to keep the question short, I had an issue with the same code earlier, I asked few more questions after it was resolved but did not hear back, that's why make a new post.
maintext class is not responding to any CSS styling e.g. border, background or other cosmetic properties, but has a major effect on the enclosing elements when commented out or deleted. Even an empty CSS declaration keeps the contents together when maintext class is deleted/commented out h1 spreads out and the effects go wild.
I want to position the maintext class including content elements to the right middle of the landing page. I can position button element and h1 items separately using with maintext class, using left and top properties, but I want the maintext block to position as a single unit.
#import url('https://fonts.googleapis.com/css2?family=Dancing+Script:wght#700&family=Reggae+One&display=swap');
html {
margin: 0;
padding: 0;
background-image: url(main.jpg);
width: 100%;
height: 100%;
background-size: cover;
z-index: 100;
position: relative;
}
html::before {
content: "";
position: absolute;
left: 0;
top: 0;
height: 100%;
width: 100%;
background-color: white;
opacity: .3;
z-index: -10;
}
.menu {
display: inline-block;
margin-left: 52%;
/* border: 2px solid red; */
}
.menu ul {
right: 10px;
top: 10px;
list-style-type: none;
text-align: center;
border-radius: 10px;
background-color: transparent;
display: flex;
justify-content: center;
width: 600px;
padding: 0 10px;
height: 50px;
background-image: url(main.jpg);
background-size: cover;
background-position-x: -650px;
background-repeat: no-repeat;
background-color: tranparent .6;
}
.menu ul a {
text-decoration: none;
color: inherit;
transition-duration: 2s;
box-sizing: border-box;
}
.menu ul li {
border-collapse: collapse;
font-size: 18px;
font-family: 'Reggae One', cursive;
color: black;
box-sizing: border-box;
text-align: center;
margin-top: auto;
margin-bottom: auto;
margin-right: 40px;
display: inline-block;
/* padding: 7px 15px; */
border-radius: 7px;
transition-duration: 1s;
transition-timing-function: ease;
position: static;
font-weight: bolder;
background: transparent;
/* border: 1px solid red; */
text-decoration: underline;
}
.menu ul li:hover {
color: red;
/* box-shadow: 1px 1px 200px 200px rgba(92,137,204,.3); */
box-shadow: 1px 1px 200px 200px rgba(0, 0, 0, .3);
border: 1px solid black;
/* border: 1px solid rgba(0,0,0,.3); */
background: transparent;
}
/* /* .am
{
position:absolute;
}
ul.am{
position: absolute;
/* border: 2px solid red; */
/* list-style-type:none;
list-style-position: inside;
text-decoration: none;
display:none;
*/
*/
/* }
ul.am li{
display:block;
text-align: left;
margin-left:-40px;
padding:5px 0;
}
.menu ul li:hover ul.am{
display:block;
} */
*/
/*Main text on the main page*/
.maintext {
padding: 0;
margin: 0;
width: 100px;
height: 100px;
border: 2px solid red;
}
.maintext h1 {
z-index: 23;
color: transparent;
display: inline-block;
position: relative;
left: 900px;
top: 200px;
font-family: 'Reggae One', cursive;
border: 2px solid red;
margin-top: -10px;
animation: show .5s ease forwards;
animation-delay: 1s;
}
.maintext h1 span {
position: absolute;
left: 0;
top: 0;
height: 100%;
width: 0;
background-color: rgba(0, 0, 0, .2);
animation: overlay 1s ease forwards;
animation-delay: .5s;
}
h1:nth-of-type(1) {
animation-delay: 1s;
}
h1:nth-of-type(2) {
animation-delay: 2s;
}
h1:nth-of-type(3) {
animation-delay: 3s;
}
h1:nth-of-type(1) span {
animation-delay: .5s;
}
h1:nth-of-type(2) span {
animation-delay: 1.5s;
}
h1:nth-of-type(3) span {
animation-delay: 2.5s;
}
.maintext .butt {
z-index: 45;
position: relative;
left: 900px;
top: 200px;
width: 250px;
height: 50px;
padding: 5px 30px;
border-radius: 8px;
background-color: transparent;
font-size: 25px;
font-weight: bolder;
font-family: 'Reggae One', cursive;
letter-spacing: 4px;
transition-duration: 2s;
transition-timing-function: ease;
color: black;
border: 2px solid black;
}
.maintext .butt:hover {
color: white;
box-shadow: 1px 1px 200px 200px rgba(92, 137, 204, .3);
background: transparent;
}
.maintext .align h1 {
display: flex;
justify-content: center;
align-items: center;
}
#keyframes overlay {
50% {
width: 100%;
left: 0;
}
100% {
left: 100%;
width: 0;
}
}
#keyframes show {
100% {
color: rgb(0, 0, 0, .8);
}
}
<section class="hero">
<div class="menu">
<ul>
<li>About Me</li>
<li>Work Experience</li>
<li>Hobbies</li>
<li>Gallery</samp>
</li>
</ul>
</div>
<div class="maintext">
<h1 class="align">Hello, <span></span></h1><br>
<h1 class="align">My Name is <span></span></h1><br>
<h1 class="align">Abc Xyz <span></span></h1><br>
<!-- <button class="butt align">Portfolio</button> -->
</div>
<div style="clear: both"></div>
</section>

Speech bubble with rotation when mouse goes over it

I'm in the process of playing with css a bit. Unfortunately, it doesn't look quite the way I'd like it to yet. The speech bubble should be smaller and directly above them. The other reason is the rotation when the mouse pointer goes over the speech bubble the complete speech bubble should rotate. Unfortunately, when you rotate it, everything else looks like a speech bubble....
How do I make the bubble smaller and put it over them and how do I make the rotation look better.
HTML
#import url('https://fonts.googleapis.com/css?family=Montserrat:400,800');
body {
padding: 50px;
font-family: 'Montserrat', sans-serif;
}
.spinner-text {
color: #fff;
}
.spinning {
color: #fff;
}
.spinning:hover {
width: 100px;
height: 100px;
color: #fff;
background-color: #5869FF;
animation-name: spin;
animation-duration: 5000ms;
animation-iteration-count: infinite;
animation-timing-function: linear;
/* transform: rotate(3deg); */
/* transform: rotate(0.3rad);/ */
/* transform: rotate(3grad); */
/* transform: rotate(.03turn); */
}
#keyframes spin {
from {
transform:rotate(0deg);
}
to {
transform:rotate(360deg);
}
}
.bubble {
position: relative;
font-family: sans-serif;
font-size: 18px;
line-height: 24px;
width: 300px;
color: #fff;
background: #5869FF;
border-radius: 40px;
padding: 24px;
text-align: center;
color: #000;
}
.bubble-bottom-left:before {
content: "";
width: 0px;
height: 0px;
position: absolute;
border-left: 24px solid #5869FF;
border-right: 12px solid transparent;
border-top: 12px solid #5869FF;
border-bottom: 20px solid transparent;
left: 32px;
bottom: -24px;
}
.blue {
color: #5869FF;
}
.black {
color: #3B3B3B;
}
.text {
text-align: center;
display: flex;
margin-top: 35px;
}
<div>
<div class="spinning">
<div class="bubble bubble-bottom-left" contenteditable>
<div class="spinner-text">
:)
</div>
</div>
</div>
<div class="text">
<div class="blue">this</div>
<div class="black">is</div>
<div class="blue">name</div>
</div>
</div>
What I have
What I want
Try this, Instead of animation on .spinning div and animation on .spinner-text only
#import url('https://fonts.googleapis.com/css?family=Montserrat:400,800');
body {
padding: 50px;
font-family: 'Montserrat', sans-serif;
}
.spinner-text {
color: #fff;
}
.spinning {
margin-left: 30px;
}
.spinning:hover .bubble .spinner-text {
background-color: #5869FF;
animation-name: spin;
animation-duration: 5000ms;
animation-iteration-count: infinite;
animation-timing-function: linear;
/* transform: rotate(3deg); */
/* transform: rotate(0.3rad);/ */
/* transform: rotate(3grad); */
/* transform: rotate(.03turn); */
}
#keyframes spin {
from {
transform:rotate(0deg);
}
to {
transform:rotate(360deg);
}
}
.bubble {
position: relative;
font-family: sans-serif;
font-size: 30px;
line-height: 28px;
width: 52px;
height: 52px;
color: #fff;
padding: 0;
text-align: center;
color: #000;
}
.bubble-bottom-left:before {
content: "";
width: 0px;
height: 0px;
position: absolute;
border-left: 14px solid #5869FF;
border-right: 12px solid transparent;
border-top: 12px solid #5869FF;
border-bottom: 20px solid transparent;
left: 15px;
bottom: -20px;
}
.bubble .spinner-text {
background: #5869FF;
border-radius: 40px;
padding: 12px;
border-radius: 40px;
}
.blue {
color: #5869FF;
}
.black {
color: #3B3B3B;
}
.text {
text-align: center;
display: flex;
margin-top: 20px;
font-weight: bold;
font-size: 20px;
}
<div>
<div class="spinning">
<div class="bubble bubble-bottom-left" contenteditable>
<div class="spinner-text">
:)
</div>
</div>
</div>
<div class="text">
<div class="blue">this</div>
<div class="black">is</div>
<div class="blue">name</div>
</div>
</div>
Here you have the solution which is coresponding with the screenshot of your requirements. I have modified Minals code to get a faster solution because he did really good job with fixing the rotate issue.
#import url('https://fonts.googleapis.com/css?family=Montserrat:400,800');
body {
padding: 50px;
font-family: 'Montserrat', sans-serif;
}
.spinner-text {
color: #fff;
font-size:20px;
font-weight:700;
width:40px;
}
.spinning {
margin-left: 115px;
}
.spinning:hover .bubble .spinner-text {
animation-name: spin;
animation-duration: 5000ms;
animation-iteration-count: infinite;
animation-timing-function: linear;
}
.bubble .spinner-text {
background: transparent!important;
border-radius: 40px;
padding: 10px;
border-radius: 40px;
position:absolute;
left:-10px;
bottom:2px;
}
#keyframes spin {
from {
transform:rotate(0deg);
}
to {
transform:rotate(360deg);
}
}
.bubble {
position: relative;
font-family: sans-serif;
font-size: 18px;
line-height: 24px;
width: 0px;
height:0px;
background: #5869FF;
border-radius: 40px;
padding: 21px;
text-align: center;
color: #000;
top:14px;
}
.bubble-bottom-left:before {
content: "";
width: 10px;
height: 15px;
position: absolute;
background-color: #5869ff;
left: 5px;
bottom: -8px;
border-radius: 0px 0px 100px 0px;
transform: translate(0, -5px);
}
.blue {
color: #5869FF;
font-size:25px;
font-weight:600;
}
.black {
color: #3B3B3B;
font-size:25px;
font-weight:600;
}
.text {
text-align: center;
display: flex;
margin-top: 20px;
font-weight: bold;
font-size: 20px;
}
<div>
<div class="spinning">
<div class="bubble bubble-bottom-left" contenteditable>
<div class="spinner-text">
:)
</div>
</div>
</div>
<div class="text">
<div class="blue">this</div>
<div class="black">is</div>
<div class="blue">name</div>
</div>
</div>
You need to set a transform origin by transform-origin: 0% 0% to rotate element in center or what point you want to transform.
See JSFiddle Sample
body {
padding: 50px;
font-family: "Montserrat", sans-serif;
}
.spinner-text {
color: #fff;
}
.spinning {
color: #fff;
position: absolute;
bottom: 28px;
left: 80px;
width: 40px;
height: 40px;
}
.spinning:hover {
cursor: default;
color: #fff;
animation-name: spin;
animation-duration: 5000ms;
animation-iteration-count: infinite;
animation-timing-function: linear;
transform-origin: 50% 50%;
}
#keyframes spin {
from {
transform: rotate(0deg);
}
to {
transform: rotate(360deg);
}
}
#speechBubble {
display: block;
position: relative;
}
.bubble {
position: absolute;
font-family: sans-serif;
font-size: 18px;
line-height: 20px;
width: 20px;
height: 20px;
color: #fff;
background: #5869ff;
border-radius: 50%;
padding: 10px;
text-align: center;
}
.bubble-bottom-left:before {
content: "";
width: 6px;
height: 18px;
position: absolute;
background-color: #5869ff;
transform: rotate(35deg);
left: 15px;
bottom: -8px;
border-radius: 0px 0px 40px 0px;
}
.blue {
color: #5869ff;
}
.black {
color: #3b3b3b;
}
.text {
text-align: center;
display: flex;
margin-top: 35px;
font-weight: 600;
font-size: 20px;
}
/* EOS */
<div id="speechBubble">
<div class="spinning">
<div class="bubble bubble-bottom-left" contenteditable>
<div class="spinner-text">
:)
</div>
</div>
</div>
<div class="text">
<div class="blue">this</div>
<div class="black">is</div>
<div class="blue">name</div>
</div>
</div>

How to create content just below an absolute background image

I created some background images in a div with slideshow and some content displaying on that, and now I'm trying to add a section right below my background image but anything I add after my background div in my html, locates behind my background image and top of my window as if I've had created no content in my webpage before this section except a navbar with sticky position. I put my codes here for better perception.
I'm trying to create content just after my background image as different, separated parts of my webpage, does anyone have an idea?
P.S: My main focus is running this web on full screen windows so please excuse my cluttered code result in non-full-screen windows.
*,
*::before,
*::after{
padding: 0;
margin: 0;
box-sizing: border-box;
}
body{
background-color: aqua;
}
header{
z-index: 999999999;
overflow: hidden;
position: sticky;
top: -31px;
}
header .header_main{
background-color: rgba(255,255,255,0.98);
}
header div.header_meta{
font-family: 'Open Sans', sans-serif;
font-weight: bold;
font-size: 11px;
border-bottom: 1px solid rgba(224, 224, 224, 0.56);
}
header div.container{
line-height: 30px;
width: 90%;
margin: auto;
padding: 0 50px;
}
header div.container nav ul{
line-height: 30px;
margin: 0 auto;
float: right;
}
header div.container nav ul li{
float: right;
list-style: none;
}
header div.container nav ul li a{
text-decoration: none;
float: right;
padding: 0 10px;
color: #ffffff;
}
header div.container nav ul li a:hover{
text-decoration: underline;
color: #E6E6E6;
}
header .header_meta .header_contact{
margin: auto;
line-height: 30px;
color: #ffffff;
}header .header_main{
box-shadow: 0 3px 4px -4px rgba(138, 138, 138, 0.65);
}
header .header_main .container_logo_nav{
width: 90%;
height: 60px;
line-height: 60px;
margin: 0 auto;
padding: 0 4%;
}
header .header_main .container_logo_nav img{
height: 100%;
width: 216px;
float: left;
}
header .header_main .container_logo_nav ul{
float: right;
padding-right: 1%;
}
header .header_main .container_logo_nav ul li{
float: right;
list-style: none;
}
header .header_main .container_logo_nav ul li a{
text-decoration: none;
font-family: 'Open Sans', sans-serif;
font-weight: bolder;
font-size: 14px;
color: #6E6E6E;
padding: 0 13px;
transition: 300ms;
}
header .header_main .container_logo_nav ul li a.search{
font-size: 11px;
}
header .header_main .container_logo_nav ul li a:hover{
color: #000000;
}
.container_slider{
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 82vh;
animation: animate 35s ease-in-out infinite;
background-size: cover;
background: no-repeat center;
clear: both;
display: block;
}
.container_slider::before{
width: 100%;
height: 100%;
content:"";
background-color: rgba(22,22,22,0.2);
position: absolute;
top: 0;
}
#keyframes animate{
0%,100%{
background-image: url("Background_Image1");
}
20%{
background-image: url("Background_Image2");
}
40%{
background-image: url("Background_Image3");
}
60%{
background-image: url("Background_Image4");
}
80%{
background-image: url("Background_Image5");
}
}
.container_slider .outer{
width: 100%;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50% , -50%);
text-align: center;
}
.container_slider .outer .details{
}
.container_slider .outer .details h1{
font-family: 'Finger Paint', cursive;
font-weight: lighter;
color: #ffffff;
font-size: 70px;
line-height: 77px;
padding: 15px 0;
animation: caption 600ms ease-in-out 1;
}
#keyframes caption {
0%{
transform: translate(0, -20px);
opacity: 0;
}
100%{
transform: translate(0, 0);
opacity: 1;
}
}
.container_slider .outer .details span{
font-family: 'Open Sans';
font-weight: 600;
font-size: 16px;
color: #ffffff;
display: block;
animation: ltlspan 600ms linear 1;
}
#keyframes ltlspan {
0%{
transform: translate(0, 20px);
opacity: 0;
}
100%{
transform: translate(0, 0);
opacity: 1;
}
}
.container_slider .outer .buttons{
width: 100%;
margin-top: 40px;
}
.container_slider .outer a{
background-color: #f8f8f8;
width: 152px;
height: 46px;
line-height: 23px;
border-radius: 100px;
padding: 10px 20px;
margin: 0 10px;
text-decoration: none;
font-family: 'Open Sans', sans-serif;
font-size: 12px;
font-weight: bold;
display: inline-block;
text-align: center;
transition: 300ms;
color: #666666;
animation: abuttons 1300ms ease-in 1;
}
#keyframes abuttons {
0%{
transform: translate(0, -20px);
opacity: 0;
}
100%{
transform: translate(0, 0);
opacity: 1;
}
}
.container_slider .outer a:first-child{
background-color: #109bc5;
color: #ffffff;
border-bottom: 1px solid #0079a3;
}
.container_slider .outer a:first-child:hover{
background-color: rgba(16, 156, 198, 0.9);
}
.container_slider .outer a:nth-child(2):hover{
background-color: rgba(255, 255, 255, 0.86);
color: black;
}
div.box{
width: 100px;
height: 100px;
background-color: blue;
/* I want this box to be displayed below my background image */
}
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Untitled Document</title>
<link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css2?family=Open+Sans:wght#300&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/css2?family=Open+Sans+Condensed:wght#700&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/css2?family=Finger+Paint&display=swap" rel="stylesheet">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.1/css/all.min.css">
<link href="https://fonts.googleapis.com/css2?family=Open+Sans:wght#600&display=swap" rel="stylesheet">
<link rel="stylesheet" href="css/style.css">
</head>
<body>
<header>
<div class="header_meta">
<div class="container">
<nav>
<ul>
<li> Registration </li>
<li> Customer Login </li>
</ul>
</nav>
<div class="header_contact"> <span>Call us now: 555-147-5643</span> </div>
</div>
</div>
<div class="header_main">
<div class="container_logo_nav">
<span class="logo"> <img src="images/logo-large.png" alt=""> </span>
<nav class="main_menu">
<ul>
<li><a class="search" href="#"><i class="fa fa-search"></i></a></li>
<li>News</li>
<li>Contact</li>
<li>About</li>
<li>Deals</li>
<li>Destinations</li>
<li>Welcome</li>
</ul>
</nav>
</div>
</div>
</header>
<div class="container_slider">
<div class="outer">
<div class="details">
<h1>To Travel is to live</h1>
<h2>
<span>Want to make a journey? We got the destinations!</span>
</h2>
</div>
<div class="buttons">
ALL DESTINATIONS
LATEST OFFERS
</div>
</div>
</div>
<div class="box"></div>
</body>
</html>
You have set your wrapper to position absolute together with inner. I have changed the .container_slider to relative to wrap properly your slider and box.
[screenshot of the result][1]
here is a screenshot: https://i.stack.imgur.com/8hTNT.jpg
*,
*::before,
*::after {
padding: 0;
margin: 0;
box-sizing: border-box;
}
body {
background-color: aqua;
}
header {
z-index: 999999999;
overflow: hidden;
position: sticky;
top: -31px;
}
header .header_main {
background-color: rgba(255, 255, 255, 0.98);
}
header div.header_meta {
font-family: 'Open Sans', sans-serif;
font-weight: bold;
font-size: 11px;
border-bottom: 1px solid rgba(224, 224, 224, 0.56);
}
header div.container {
line-height: 30px;
width: 90%;
margin: auto;
padding: 0 50px;
}
header div.container nav ul {
line-height: 30px;
margin: 0 auto;
float: right;
}
header div.container nav ul li {
float: right;
list-style: none;
}
header div.container nav ul li a {
text-decoration: none;
float: right;
padding: 0 10px;
color: #ffffff;
}
header div.container nav ul li a:hover {
text-decoration: underline;
color: #e6e6e6;
}
header .header_meta .header_contact {
margin: auto;
line-height: 30px;
color: #ffffff;
}
header .header_main {
box-shadow: 0 3px 4px -4px rgba(138, 138, 138, 0.65);
}
header .header_main .container_logo_nav {
width: 90%;
height: 60px;
line-height: 60px;
margin: 0 auto;
padding: 0 4%;
}
header .header_main .container_logo_nav img {
height: 100%;
width: 216px;
float: left;
}
header .header_main .container_logo_nav ul {
float: right;
padding-right: 1%;
}
header .header_main .container_logo_nav ul li {
float: right;
list-style: none;
}
header .header_main .container_logo_nav ul li a {
text-decoration: none;
font-family: 'Open Sans', sans-serif;
font-weight: bolder;
font-size: 14px;
color: #6e6e6e;
padding: 0 13px;
transition: 300ms;
}
header .header_main .container_logo_nav ul li a.search {
font-size: 11px;
}
header .header_main .container_logo_nav ul li a:hover {
color: #000000;
}
.container_slider {
position: relative; /*changed to relative*/
top: 0;
left: 0;
width: 100%;
height: 82vh;
animation: animate 35s ease-in-out infinite;
background-size: cover;
background: no-repeat center;
clear: both;
display: block;
}
.container_slider::before {
width: 100%;
height: 100%;
content: '';
background-color: rgba(22, 22, 22, 0.2);
position: absolute;
top: 0;
}
#keyframes animate {
0%,
100% {
background-image: url('https://www.pexels.com/photo/green-leaf-plant-808510/');
}
20% {
background-image: url('https://www.pexels.com/photo/green-leaf-plant-808510/');
}
40% {
background-image: url('https://www.pexels.com/photo/green-leaf-plant-808510/');
}
60% {
background-image: url('https://www.pexels.com/photo/green-leaf-plant-808510/');
}
80% {
background-image: url('https://www.pexels.com/photo/green-leaf-plant-808510/');
}
}
.container_slider .outer {
width: 100%;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
text-align: center;
}
.container_slider .outer .details {
}
.container_slider .outer .details h1 {
font-family: 'Finger Paint', cursive;
font-weight: lighter;
color: #ffffff;
font-size: 70px;
line-height: 77px;
padding: 15px 0;
animation: caption 600ms ease-in-out 1;
}
#keyframes caption {
0% {
transform: translate(0, -20px);
opacity: 0;
}
100% {
transform: translate(0, 0);
opacity: 1;
}
}
.container_slider .outer .details span {
font-family: 'Open Sans';
font-weight: 600;
font-size: 16px;
color: #ffffff;
display: block;
animation: ltlspan 600ms linear 1;
}
#keyframes ltlspan {
0% {
transform: translate(0, 20px);
opacity: 0;
}
100% {
transform: translate(0, 0);
opacity: 1;
}
}
.container_slider .outer .buttons {
width: 100%;
margin-top: 40px;
}
.container_slider .outer a {
background-color: #f8f8f8;
width: 152px;
height: 46px;
line-height: 23px;
border-radius: 100px;
padding: 10px 20px;
margin: 0 10px;
text-decoration: none;
font-family: 'Open Sans', sans-serif;
font-size: 12px;
font-weight: bold;
display: inline-block;
text-align: center;
transition: 300ms;
color: #666666;
animation: abuttons 1300ms ease-in 1;
}
#keyframes abuttons {
0% {
transform: translate(0, -20px);
opacity: 0;
}
100% {
transform: translate(0, 0);
opacity: 1;
}
}
.container_slider .outer a:first-child {
background-color: #109bc5;
color: #ffffff;
border-bottom: 1px solid #0079a3;
}
.container_slider .outer a:first-child:hover {
background-color: rgba(16, 156, 198, 0.9);
}
.container_slider .outer a:nth-child(2):hover {
background-color: rgba(255, 255, 255, 0.86);
color: black;
}
div.box {
width: 100px;
height: 100px;
background-color: blue;
/* I want this box to be displayed below my background image */
}

Alignment issues in children of looped words animation

I used to do my best to solve the problem, however, it doesn't work. As you can see, if you run the code the animation is not inline or they are not in proper position, what I want to - the animation should be in between or centered in the Let's Make and Awesome elements. Looking forward and answer and if you mind can you please explain to make so that i will understand it fully. Thank You so much
.circle {
position: relative;
border-radius: 50%;
width: 30rem;
height: 30rem;
background-color: #6CA9A5;
margin: 5rem auto;
}
.hello, .hello2 {
position: relative;
text-transform: uppercase;
font-family: "Montserrat", sans-serif;
font-weight: 900;
letter-spacing: .2rem;
font-size: 1.5rem;
color: #fff;
text-align: center;
padding: 70px 0 2px 0;
/* z-index: 1; */
}
.hello2 {
position:absolute;
top: 58px; /* changeable */
left:50%;
transform:translateX(-50%);
}
.hello span:hover {
color: #f4511e;
transition: .59s;
}
.circle a {
position: absolute;
top:60%; /* changeable */
left:50%;
transform:translateX(-50%);
font-size: 15px;
text-decoration: none;
background: #fff;
padding: 15px 35px;
border-radius: 35px;
text-transform: uppercase;
}
/* .more a {
height: 150px;
width: 500px;
background-color: #fff;
} */
#container {
color:#999;
text-transform: uppercase;
font-family: "Montserrat", sans-serif;
font-size: 1.5rem;
font-weight: bold;
padding-top: 200px;
position: relative;
width:100%;
bottom: 45%;
display:block;
text-align: center;
}
#flip {
height: 80px;
overflow:hidden;
}
#flip > div > div {
border-radius: 30px;
color:#fff;
padding:4px 15px 4px 15px;
height:30px;
margin-bottom: 62px;
display:inline-block;
}
#flip > div > .ever {
/* height: 59px; */
}
#flip div:first-child {
animation: show 5s linear infinite;
}
#flip div div {
background:#42c58a;
}
#flip div:first-child div {
background:#4ec7f3;
}
#flip div:last-child div {
background:#DC143C;
}
#keyframes show {
0% {margin-top:-270px;}
5% {margin-top:-180px;}
33% {margin-top:-180px;}
38% {margin-top:-90px;}
66% {margin-top:-90px;}
71% {margin-top:0px;}
99.99% {margin-top:0px;}
100% {margin-top:-270px;}
}
<div class="content">
<h1 class="possible">Everything is Possible</h1>
<div class="circle">
<p class="hello">Let's Make </p>
<div id="container">
<div id="flip">
<div><div>wOrK</div></div>
<div><div>lifeStyle</div></div>
<div><div class="ever">Everything</div></div>
</div>
</div>
<p class="hello2">Awesome</p>
Read More
</div>
</div>

CSS unknown property "transform"

I am having some problems with my stylesheet. I am trying to do some funny hover effects, but somehow I can't use transform. Can anyone help me? The error occurs down below the comment "view one".
HTML:
<html xmlns="http://www.w3.org/1999/xhtml">
<link rel="stylesheet" href="stylesheets/style.css" type="text/css" media="screen" />
<head>
<title>thomasteilmann.dk</title>
</head>
<body>
<div class="header">
<h1><img src="teilmann.jpg" alt="Sick Logo" /></a></h1>
Copyright Thomas Teilmann
</div>
<div id="content">
<div class="view view-first">
<img src="images/cosmic_art_icon.jpg"/>
<div class="mask">
<h2>Cosmic Art</h2>
<p>A galleri of cosmic art made in Photoshop</p>
View
</div>
</div>
</body>
</html>
CSS:
body {
background: #21211f;
width: 902px;
font-family: helvetica, arial, sans-serif;
margin: 0 auto;
padding: 40px 0 0 0;
}
.header{
position: absolute;
width: 185px;
}
h1 img{
float: left;
padding: 0;
margin: 0;
}
#navbar ul {
position: absolute;
margin-left: 190px;
padding: 5px;
list-style-type: none;
text-align: center;
background-color: white;
width: 692px;
margin-top: 65px;
}
#navbar ul li {
display: inline;
}
#navbar ul li a {
text-decoration: none;
padding: .2em 1em;
font-family: Georgia, times, serif;
color: black;
background-color: white;
}
#navbar ul li a:hover {
color: black;
background-color: #fff;
}
#content{
width: 612px;
background: #466287 url(images/corner.jpg) top right no-repeat;
line-height: 22px;
font-size: 18px;
font-family: Georgia, times, serif;
margin: 0 0 10px 0;
float: left;
color: #ffffff;
margin-left: 190px;
margin-top: 100px;
padding: 20px 60px 20px 30px;
}
img {
border: none;
}
.form{
margin: 15px 0;
padding: 20px 0 20px 0;
background: url(form1.jpg) no-repeat;
font-family: helvetica, arial, sans-serif;
}
/*
* View
*/
.view {
width: 279px;
height: 198px;
margin: 10px;
float: left;
border: 5px solid white;
overflow: hidden;
position: relative;
text-align: center;
box-shadow: 1px 2px 2px #e6e6e6;
cursor: default;
background: #fff url(../images/bgimg.jpg) no-repeat center center;
}
.view .mask, .view .content {
width: 279px;
height: 198px;
position: absolute;
overflow: hidden;
top: 0;
left: 0;
}
.view img {
display: block;
position: relative;
}
.view h2 {
text-transform: uppercase;
color: #fff;
text-align: center;
position: relative;
font-size: 17px;
padding: 10px;
background: rgba(0, 0, 0, 0.8);
margin: 20px 0 0 0;
}
.view p {
font-family: Georgia, serif;
font-style: italic;
font-size: 12px;
position: relative;
color: #fff;
padding: 10px 20px 20px;
text-align: center;
}
.view a.info {
display: inline-block;
text-decoration: none;
padding: 7px 14px;
background: #000;
color: #fff;
text-transform: uppercase;
box-shadow: 0 0 1px #000;
}
.view a.info:hover {
box-shadow: 0 0 5px #000;
}
/* View one
*/
.view-first img {
transition: all 0.2s linear;
}
.view-first .mask {
opacity: 0;
background-color: rgba(219,127,8, 0.7);
transition: all 0.4s ease-in-out;
}
.view-first h2 {
transform: translateY(-100px);
opacity: 0;
transition: all 0.2s ease-in-out;
}
.view-first p {
transform: translateY(100px);
opacity: 0;
transition: all 0.2s linear;
}
.view-first a.info{
opacity: 0;
transition: all 0.2s ease-in-out;
}
.view-first:hover img {
transform: scale(1.1);
}
.view-first:hover .mask {
opacity: 1;
}
.view-first:hover h2,
.view-first:hover p,
.view-first:hover a.info {
opacity: 1;
transform: translateY(0px);
}
.view-first:hover p {
transition-delay: 0.1s;
}
.view-first:hover a.info {
transition-delay: 0.2s;
}
transform isn't a standard yet, so no browser supports it at present.
However, some browsers support vendor extensions based on the draft:
-ms-transform in Internet Explorer 9
-moz-transform in Mozilla browsers (most notably Firefox)
-webkit-transform in Webkit browsers (Chrome, Safari, etc.)
-o-transform in Opera
Possibly others, I don't know.
just use this css inside your css code.Remember transform does not work in all browsers.
.view-first:hover {
transform: rotate(30deg);
-ms-transform: rotate(30deg); /* IE 9 */
-webkit-transform: rotate(30deg); /* Safari and Chrome */
-o-transform: rotate(30deg); /* Opera */
-moz-transform: rotate(30deg); /* Firefox */
}
You'll probably need to use vendor specific styles for the transitions, for example:
#id_of_element {
-webkit-transition: all 0.2s linear;
-moz-transition: all 0.2s linear;
-o-transition: all 0.2s linear;
-ms-transition: all 0.2s linear;
transition: all 0.2s linear;
}
You can read more about transitions and transformations here - http://css3.bradshawenterprises.com/