Why isn't my SPAN CLASS= with _several_ parameters working? - html

I need to apply several parameters to my text via span class= element. While i'm absolutely precisely following the suggested format - parameters are to be separated by space - my 1st parameter is not working (removing blur filter from the word ATTENTION!).
.comment_box {
display: flex;
flex-direction: column;
width: 100%;
position: fixed;
bottom: 0;
text-align: left;
background: #fff8e5;
}
.comment_title {
font-family: Verdana, Geneva, sans-serif;
color: #f92504;
margin: 0.7% 0 1.4% 1vw;
text-shadow: 0em 0.12em 0.15em rgba(0, 102, 204, 0.2), 0.09em 0.15em 0.15em rgba(249, 37, 4, 0.1), -0.09em 0.15em 0.15em rgba(249, 37, 4, 0.1);
font-size: calc(0.5em + 2.3vw);
font-weight: 700;
}
.comment_text {
width: auto;
font-family: Tahoma, Geneva, sans-serif;
color: #1f2c60;
font-weight: 400;
word-wrap: break-word;
text-shadow: none; /* МОЖЕТ И ПОСТАВИТЬ ЛЕГКУЮ ТЕНЬ...? */
margin: 0% 1vw 2% 1vw;
font-size: calc(0.35em + 1.5vw);
}
.blur_filter_off {
animation-name: blur_decrease;
animation-timing-function: linear;
animation-duration: 2s;
}
#keyframes blur_decrease {
from { filter: blur(0.35em); }
to { filter: blur(0); }
}
.grayscale_filter_off {
animation-name: grayscale_decrease;
animation-timing-function: linear;
animation-duration: 2s;
}
#keyframes grayscale_decrease {
from { filter: grayscale(85%); }
to { filter: grayscale(0); }
}
<div class="comment_box">
<div class="comment_title"><span class="blur_filter_off grayscale_filter_off">ATTENTION!</span>
</div>
<div class="comment_text"><span class="blur_filter_off">Comment: Lorem ipsum dolor sit amet...</span>
</div>
</div>
<br>
What is wrong with my code please?

Your grayscale_filter_off class is overriding your blur_filter_off class because they are setting the same properties.
In order to run the 2 animations at the same time, you would need to use another class that runs them both.
.comment_box {
display: flex;
flex-direction: column;
width: 100%;
position: fixed;
bottom: 0;
text-align: left;
background: #fff8e5;
}
.comment_title {
font-family: Verdana, Geneva, sans-serif;
color: #f92504;
margin: 0.7% 0 1.4% 1vw;
text-shadow: 0em 0.12em 0.15em rgba(0, 102, 204, 0.2), 0.09em 0.15em 0.15em rgba(249, 37, 4, 0.1), -0.09em 0.15em 0.15em rgba(249, 37, 4, 0.1);
font-size: calc(0.5em + 2.3vw);
font-weight: 700;
}
.comment_text {
width: auto;
font-family: Tahoma, Geneva, sans-serif;
color: #1f2c60;
font-weight: 400;
word-wrap: break-word;
text-shadow: none;
/* МОЖЕТ И ПОСТАВИТЬ ЛЕГКУЮ ТЕНЬ...? */
margin: 0% 1vw 2% 1vw;
font-size: calc(0.35em + 1.5vw);
}
.blur_filter_off {
animation-name: blur_decrease;
animation-timing-function: linear;
animation-duration: 2s;
}
#keyframes blur_decrease {
from {
filter: blur(0.35em);
}
to {
filter: blur(0);
}
}
.grayscale_filter_off {
animation-name: grayscale_decrease;
animation-timing-function: linear;
animation-duration: 2s;
}
#keyframes grayscale_decrease {
from {
filter: grayscale(85%);
}
to {
filter: grayscale(0);
}
}
.grayscale_blur_filters_off {
animation-name: grayscale_blur_decrease;
animation-timing-function: linear;
animation-duration: 2s;
}
#keyframes grayscale_blur_decrease {
from {
filter: grayscale(85%) blur(0.35em);
}
to {
filter: grayscale(0) blur(0);
}
}
<div class="comment_box">
<div class="comment_title"><span class="grayscale_blur_filters_off">ATTENTION!</span>
</div>
<div class="comment_text"><span class="blur_filter_off">Comment: Lorem ipsum dolor sit amet...</span>
</div>
</div>

Related

How to optimize css style for Safari

I had a problem with the correct display of css3 styles on Safari. Here is a link to my code: https://codepen.io/VictorHub/pen/NmYOGj There are transparent stroke text over image. Everything works well but not in Safari browser(There appears a black background in the letters). Naturally we are talking about the latest versions of the Safari browser. Please help me solve this issue. The situation is complicated by the fact that I do not have macos.
html {
background: #fff;
}
body {
display: flex;
justify-content: center;
align-items: center;
min-height: 100vh;
background-image: url('https://medievaltorturemuseum.com/wp-content/uploads/2018/02/slide3-1.jpg')
}
.text-wrap {
mix-blend-mode: screen;
position: absolute;
}
.text {
text-align: center;
font-weight: 700;
color: rgb(12, 12, 12);
font-size: 98px;
background: -webkit-linear-gradient(top, rgba(170,26,24,1) 0%, rgba(213,44,50,1) 39%, rgba(236,97,94,1) 45%, rgba(202,34,34,1) 69%, rgba(148,36,43,1) 100%);
-webkit-background-clip: text;
-webkit-text-stroke: 4px transparent;
letter-spacing: -4px;
text-shadow: 0px 0px 20px rgba(208,34,40,1);
animation-name: blink2;
animation-duration: 150ms;
animation-iteration-count: infinite;
animation-direction: alternate;
-webkit-font-smoothing: antialiased !important;
}
#keyframes blink2 {
0% {
text-shadow: 0px 0px 20px rgba(208,34,40,1);
}
100% {
text-shadow: 0px 0px 20px rgba(208,34,40,0.75);
}
}
<div class="text-wrap">
<div class="text">ARE YOU BRAVE<br/>ENOUGH ?</div>
</div>
html {
background: #fff;
}
body {
display: flex;
justify-content: center;
align-items: center;
min-height: 100vh;
background-image: url('https://medievaltorturemuseum.com/wp-content/uploads/2018/02/slide3-1.jpg')
}
.text-wrap {
mix-blend-mode: screen;
position: absolute;
}
.text {
text-align: center;
font-weight: 700;
color: rgb(12, 12, 12);
font-size: 98px;
background: -webkit-linear-gradient(top, rgba(170,26,24,1) 0%, rgba(213,44,50,1) 39%, rgba(236,97,94,1) 45%, rgba(202,34,34,1) 69%, rgba(148,36,43,1) 100%);
-webkit-background-clip: text;
-webkit-text-stroke: 4px transparent;
letter-spacing: -4px;
text-shadow: 0px 0px 20px rgba(208,34,40,1);
animation-name: blink2;
animation-duration: 150ms;
animation-iteration-count: infinite;
animation-direction: alternate;
-webkit-font-smoothing: antialiased !important;
}
#keyframes blink2 {
0% {
text-shadow: 0px 0px 20px rgba(208,34,40,1);
}
100% {
text-shadow: 0px 0px 20px rgba(208,34,40,0.75);
}
}
#-webkit-keyframes blink2 {
0% {
text-shadow: 0px 0px 20px rgba(208,34,40,1);
}
100% {
text-shadow: 0px 0px 20px rgba(208,34,40,0.75);
}
}
#-moz-keyframes blink2 {
0% {
text-shadow: 0px 0px 20px rgba(208,34,40,1);
}
100% {
text-shadow: 0px 0px 20px rgba(208,34,40,0.75);
}
}
#-o-keyframes blink2 {
0% {
text-shadow: 0px 0px 20px rgba(208,34,40,1);
}
100% {
text-shadow: 0px 0px 20px rgba(208,34,40,0.75);
}
}
<div class="text-wrap">
<div class="text">ARE YOU BRAVE<br/>ENOUGH ?</div>
</div>

Cascading Style Sheet property preventing a href from working

I have downloaded from codepen this animated login here
I am simply trying to add an a href link within the html container div where folks can reset their password.
The strange thing is, I can not get this or any link of any sorts to work. (all links irrespective of destination are not live).
I think that there may be a CSS property preventing all href from working.
Any reason for this?
Index.html
<!DOCTYPE html>
<html lang="en" >
<head>
<meta charset="UTF-8">
<title>Login</title>
<link rel="stylesheet" href="css/loginstyle.css">
</head>
<body>
<div class="wrapper">
<div class="container">
<h1>Login</h1>
<form class="form" action="" method="post" enctype="multipart/form-data">
<input type="text" name="username" required placeholder="Enter Username">
<input type="password" name="password" required placeholder="Enter Password">
<button type="submit" name="submit" id="login-button">Login</button>
</form>
<!-- is this link being prevented from working by bg-bubbles class or its css -->
LINK
</div>
<!-- bg-bubbles class seems to prevent all a href's from working -->
<ul class="bg-bubbles">
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
</ul>
</div>
<script src='http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script>
<script src="js/index.js"></script>
</body>
</html>
loginstyle.css
#font-face {
font-family: 'Source Sans Pro';
font-style: normal;
font-weight: 200;
src: local('Source Sans Pro ExtraLight'), local('SourceSansPro-ExtraLight'), url(https://fonts.gstatic.com/s/sourcesanspro/v11/6xKydSBYKcSV-LCoeQqfX1RYOo3i94_wlxdr.ttf) format('truetype');
}
#font-face {
font-family: 'Source Sans Pro';
font-style: normal;
font-weight: 300;
src: local('Source Sans Pro Light'), local('SourceSansPro-Light'), url(https://fonts.gstatic.com/s/sourcesanspro/v11/6xKydSBYKcSV-LCoeQqfX1RYOo3ik4zwlxdr.ttf) format('truetype');
}
* {
box-sizing: border-box;
margin: 0;
padding: 0;
font-weight: 300;
}
body {
font-family: 'Source Sans Pro', sans-serif;
color: white;
font-weight: 300;
}
body ::-webkit-input-placeholder {
/* WebKit browsers */
font-family: 'Source Sans Pro', sans-serif;
color: white;
font-weight: 300;
}
body :-moz-placeholder {
/* Mozilla Firefox 4 to 18 */
font-family: 'Source Sans Pro', sans-serif;
color: white;
opacity: 1;
font-weight: 300;
}
body ::-moz-placeholder {
/* Mozilla Firefox 19+ */
font-family: 'Source Sans Pro', sans-serif;
color: white;
opacity: 1;
font-weight: 300;
}
body :-ms-input-placeholder {
/* Internet Explorer 10+ */
font-family: 'Source Sans Pro', sans-serif;
color: white;
font-weight: 300;
}
.wrapper {
background: #50a3a2;
background: linear-gradient(to bottom right, #50a3a2 0%, #53e3a6 100%);
position: absolute;
top: 50%;
left: 0;
width: 100%;
height: 400px;
margin-top: -200px;
overflow: hidden;
}
.wrapper.form-success .container h1 {
-webkit-transform: translateY(85px);
transform: translateY(85px);
}
.container {
max-width: 600px;
margin: 0 auto;
padding: 80px 0;
height: 400px;
text-align: center;
}
.container h1 {
font-size: 40px;
transition-duration: 1s;
transition-timing-function: ease-in-put;
font-weight: 200;
}
form {
padding: 20px 0;
position: relative;
z-index: 2;
}
form input {
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
outline: 0;
border: 1px solid rgba(255, 255, 255, 0.4);
background-color: rgba(255, 255, 255, 0.2);
width: 250px;
border-radius: 3px;
padding: 10px 15px;
margin: 0 auto 10px auto;
display: block;
text-align: center;
font-size: 18px;
color: white;
transition-duration: 0.25s;
font-weight: 300;
}
form input:hover {
background-color: rgba(255, 255, 255, 0.4);
}
form input:focus {
background-color: white;
width: 300px;
color: #53e3a6;
}
form button {
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
outline: 0;
background-color: white;
border: 0;
padding: 10px 15px;
color: #53e3a6;
border-radius: 3px;
width: 250px;
cursor: pointer;
font-size: 18px;
transition-duration: 0.25s;
}
form button:hover {
background-color: #f5f7f9;
}
.bg-bubbles {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: 1;
}
.bg-bubbles li {
position: absolute;
list-style: none;
display: block;
width: 40px;
height: 40px;
background-color: rgba(255, 255, 255, 0.15);
bottom: -160px;
-webkit-animation: square 25s infinite;
animation: square 25s infinite;
transition-timing-function: linear;
}
.bg-bubbles li:nth-child(1) {
left: 10%;
}
.bg-bubbles li:nth-child(2) {
left: 20%;
width: 80px;
height: 80px;
-webkit-animation-delay: 2s;
animation-delay: 2s;
-webkit-animation-duration: 17s;
animation-duration: 17s;
}
.bg-bubbles li:nth-child(3) {
left: 25%;
-webkit-animation-delay: 4s;
animation-delay: 4s;
}
.bg-bubbles li:nth-child(4) {
left: 40%;
width: 60px;
height: 60px;
-webkit-animation-duration: 22s;
animation-duration: 22s;
background-color: rgba(255, 255, 255, 0.25);
}
.bg-bubbles li:nth-child(5) {
left: 70%;
}
.bg-bubbles li:nth-child(6) {
left: 80%;
width: 120px;
height: 120px;
-webkit-animation-delay: 3s;
animation-delay: 3s;
background-color: rgba(255, 255, 255, 0.2);
}
.bg-bubbles li:nth-child(7) {
left: 32%;
width: 160px;
height: 160px;
-webkit-animation-delay: 7s;
animation-delay: 7s;
}
.bg-bubbles li:nth-child(8) {
left: 55%;
width: 20px;
height: 20px;
-webkit-animation-delay: 15s;
animation-delay: 15s;
-webkit-animation-duration: 40s;
animation-duration: 40s;
}
.bg-bubbles li:nth-child(9) {
left: 25%;
width: 10px;
height: 10px;
-webkit-animation-delay: 2s;
animation-delay: 2s;
-webkit-animation-duration: 40s;
animation-duration: 40s;
background-color: rgba(255, 255, 255, 0.3);
}
.bg-bubbles li:nth-child(10) {
left: 90%;
width: 160px;
height: 160px;
-webkit-animation-delay: 11s;
animation-delay: 11s;
}
#-webkit-keyframes square {
0% {
-webkit-transform: translateY(0);
transform: translateY(0);
}
100% {
-webkit-transform: translateY(-700px) rotate(600deg);
transform: translateY(-700px) rotate(600deg);
}
}
#keyframes square {
0% {
-webkit-transform: translateY(0);
transform: translateY(0);
}
100% {
-webkit-transform: translateY(-700px) rotate(600deg);
transform: translateY(-700px) rotate(600deg);
}
}
You need to set z-index:2; to the a tag along with position: relative; Here is the updated codepen.
I've created a class
.forgot-password{
z-index:2;
position:relative;
cursor: pointer;
}
and added it to anchor tag.

Rainbow text animation using only CSS

I got inspired by this Rainbow Text Animation rainbow-text-animation, and I would like to use only CSS to make this happen instead of all that complicated SCSS coding.
I got what I like so far and now I just want to make it go from left to right AND having multiple colors in one entire line instead of one color at a time.
Run the code snippet to see what I'm talking about.
So as you can see, I want as many colors I want in one line and not one color in the entire line (one at a time).
#shadowBox {
background-color: rgb(0, 0, 0);
/* Fallback color */
background-color: rgba(0, 0, 0, 0.2);
/* Black w/opacity/see-through */
border: 3px solid;
}
.rainbow {
text-align: center;
text-decoration: underline;
font-size: 32px;
font-family: monospace;
letter-spacing: 5px;
animation: colorRotate 6s linear 0s infinite;
}
#keyframes colorRotate {
from {
color: #6666ff;
}
10% {
color: #0099ff;
}
50% {
color: #00ff00;
}
75% {
color: #ff3399;
}
100% {
color: #6666ff;
}
}
<div id="shadowBox">
<h3 class="rainbow">COMING SOON</h3>
</div>
You can achieve this effect by using a moving gradient background, color to transparent, and background clip to text.
#shadowBox {
background-color: rgb(0, 0, 0);
/* Fallback color */
background-color: rgba(0, 0, 0, 0.2);
/* Black w/opacity/see-through */
border: 3px solid;
}
.rainbow {
text-align: center;
text-decoration: underline;
font-size: 32px;
font-family: monospace;
letter-spacing: 5px;
}
.rainbow_text_animated {
background: linear-gradient(to right, #6666ff, #0099ff , #00ff00, #ff3399, #6666ff);
-webkit-background-clip: text;
background-clip: text;
color: transparent;
animation: rainbow_animation 6s ease-in-out infinite;
background-size: 400% 100%;
}
#keyframes rainbow_animation {
0%,100% {
background-position: 0 0;
}
50% {
background-position: 100% 0;
}
}
<div id="shadowBox">
<h3 class="rainbow rainbow_text_animated">COMING SOON</h3>
</div>
#shadowBox {
background-color: rgb(0, 0, 0);
/* Fallback color */
background-color: rgba(0, 0, 0, 0.2);
/* Black w/opacity/see-through */
border: 3px solid;
}
.rainbow {
text-align: center;
text-decoration: underline;
font-size: 32px;
font-family: monospace;
letter-spacing: 5px;
animation: colorRotate .5s linear 0s infinite;
}
#keyframes colorRotate {
from {
color: #6666ff;
}
10% {
color: #0099ff;
}
50% {
color: #00ff00;
}
75% {
color: #ff3399;
}
100% {
color: #6666ff;
}
}
<div id="shadowBox">
<h3 class="rainbow">VERB</h3>
</div>

CSS Typerwriter animation gone wrong while working with width percentage

So I took this piece of code: http://codepen.io/thiagoteles/pen/ogoxLw
And I tried to implement it in my blog's title: http://samanx.github.io/
For some reason I can't get it to stay in the center.
I tried creating an additional div and assigning to it this code:
.center {
margin: auto;
position: absolute;
top: 0; left: 0; bottom: 0; right: 0;
}
But no solution: the problem is the:
body {
background-color: black;
}
.main-header {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
height: auto;
min-height: 240px;
height: 60%;
padding: 15% 0;
}
.inner {
position: relative;
width: 80%;
max-width: 710px;
margin: 0 auto;
}
.page-title {
/* margin: 10px 0 10px 0; */
font-size: 2rem;
letter-spacing: -1px;
/* margin: 0 auto; */
white-space: nowrap;
overflow: hidden;
transform: translateY(-50%);
font-weight: 500;
text-align: center;
font-family: "Open Sans", sans-serif;
color: #fff;
}
.page-description {
margin: 0;
font-size: 2rem;
line-height: 1.5em;
font-weight: 400;
font-family: "Merriweather", serif;
letter-spacing: 0.01rem;
color: rgba(255, 255, 255, 0.8);
}
/* Animation */
.anim-typewriter {
animation: typewriter 4s steps(44) 1s 1 normal both blinkTextCursor 500ms steps(44) 0 infinite normal;
-webkit-animation: typewriter 4s steps(44) 1s 1 normal both, blinkTextCursor 500ms steps(44) 0 infinite normal;
-moz-animation: typewriter 4s steps(44) 1s 1 normal both blinkTextCursor 500ms steps(44) 0 infinite normal;
-o-animation: typewriter 4s steps(44) 1s 1 normal both blinkTextCursor 500ms steps(44) 0 infinite normal;
}
#keyframes typewriter {
from {
width: 0;
}
to {
width: 24em;
}
}
#-webkit-keyframes typewriter {
from {
width: 0;
}
to {
width: 24em;
}
}
#-moz-keyframes typewriter {
from {
width: 0;
}
to {
width: 24em;
}
}
#-o-keyframes typewriter {
from {
width: 0;
}
to {
width: 24em;
}
}
#keyframes blinkTextCursor {
from {
border-right-color: rgba(255, 255, 255, .75);
}
to {
border-right-color: transparent;
}
}
#-webkit-keyframes blinkTextCursor {
from {
border-right-color: rgba(255, 255, 255, .75);
}
to {
border-right-color: transparent;
}
}
#-moz-keyframes blinkTextCursor {
from {
border-right-color: rgba(255, 255, 255, .75);
}
to {
border-right-color: transparent;
}
}
#-o-keyframes blinkTextCursor {
from {
border-right-color: rgba(255, 255, 255, .75);
}
to {
border-right-color: transparent;
}
}
<div class="main-header-content inner">
<h1 class="page-title anim-typewriter">TaoJS - All things Javascript</h1>
<h2 class="page-description">All things Javascript: resources, my problems, my solutions</h2>
</div>
My problem is that it moves too much to the right. If I remove the lines:
width: 80%;
max-width: 710px;
Then it's not working on mobile and smaller screens.
What you need here is change some values according to your actual text changing the steps and width.
First some values to the h1:
.page-title {
/*Add this styles to center and keep the fake cursor*/
width:0;
margin:auto;
border-right:1px solid white;
}
Then change the animation to:
.anim-typewriter {
-webkit-animation: typewriter 4s steps(29) 1s 1 normal both, blinkTextCursor 500ms steps(29) 0 infinite normal;
}
#-webkit-keyframes typewriter {
from {
width: 0;
}
to {
width:13em;
}
}
Where 29 steps and 13em width are values relative to the text you want to show.
Check this Snippet:
body {
background-color: black;
}
.main-header {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
height: auto;
min-height: 240px;
height: 60%;
padding: 15% 0;
}
.inner {
position: relative;
width: 80%;
max-width: 710px;
margin: 0 auto;
}
.page-title {
font-size: 2rem;
white-space: nowrap;
overflow: hidden;
font-weight: 500;
text-align: center;
font-family: "Open Sans", sans-serif;
color: #fff;
text-align:center;
width:0;
margin:auto;
border-right:1px solid white;
}
.page-description {
margin: 0;
font-size: 2rem;
line-height: 1.5em;
font-weight: 400;
font-family: "Merriweather", serif;
letter-spacing: 0.01rem;
color: rgba(255, 255, 255, 0.8);
}
/* Animation */
.anim-typewriter {
-webkit-animation: typewriter 4s steps(29) 1s 1 normal both, blinkTextCursor 500ms steps(29) 0 infinite normal;
}
#-webkit-keyframes typewriter {
from {
width: 0;
}
to {
width:13em;
}
}
#-webkit-keyframes blinkTextCursor {
from {
border-right-color: rgba(255, 255, 255, .75);
}
to {
border-right-color: transparent;
}
}
<div class="main-header-content inner">
<h1 class="page-title anim-typewriter">TaoJS - All things Javascript</h1>
<h2 class="page-description">All things Javascript: resources, my problems, my solutions</h2>
</div>

Website Layout changing after browser switching

I am a noob in website development. Im trying for a simple website for registration but have no idea how to position the layouts. I am too confused with the div tags.
I have already tried and played a lot with inspect element. After bit of trial and error I was able to position the website properly in chrome browser. However when I switched the browser to firefox and opened the same file, all the layout got changed. I primarily doubt on positioning !the spanning, animated text in my website. It changes position on switching browser.
Any help will be appreciated. Thanks in advance! Im also posting screenshots for both browsers i.e Chrome and Firefox.! In chrome it works fine but not in firefox. Also the rotating text become larger as I reduce the size of viewport
/* Header */
.large-header {
position: absolute;
width: 100%;
background: #333;
overflow: hidden;
background-size: cover;
background-position: center center;
z-index: 1;
}
.demo-1 .large-header {
background-image: url('../img/demo-1-bg.jpg');
background-position: center bottom;
overflow: scroll;
}
.payment {
width: 100px;
height: 100px;
}
.main-title {
display: inline-table;
position: absolute;
margin: 0;
padding: 0;
color: #f9f1e9;
text-align: center;
top: 50%;
left: 50%;
-webkit-transform: translate3d(-50%, -50%, 0);
transform: translate3d(-50%, -50%, 0);
}
.demo-1 .main-title {
text-transform: uppercase;
font-size: 3.5em;
letter-spacing: 0.1em;
}
.demo-2 .main-title {
font-family: 'Clicker Script', cursive;
font-weight: normal;
font-size: 8em;
padding-left: 10px;
text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.4);
}
.demo-2 .main-title::before {
content: '';
width: 20vw;
height: 20vw;
min-width: 3.5em;
min-height: 3.5em;
background: url(../img/deco.svg) no-repeat center center;
background-size: cover;
position: absolute;
top: 50%;
left: 50%;
border-radius: 50%;
z-index: -1;
-webkit-transform: translate3d(-50%, -50%, 0);
transform: translate3d(-50%, -50%, 0);
}
.demo-3 .main-title {
padding: 10px 40px;
border: 10px double #f9f1e9;
text-transform: uppercase;
font-family: Londrina Outline, sans-serif;
}
.demo-4 .main-title {
font-size: 6em;
font-weight: 300;
padding: 10px 30px;
text-transform: uppercase;
color: #222;
}
.main-title .thin {
font-weight: 100;
font-size: 24px;
font-family: initial;
display: table-row-group;
}
#media only screen and (max-width: 768px) {
.demo-1 .main-title,
.demo-3 .main-title,
.demo-4 .main-title {
font-size: 3em;
}
.demo-2 .main-title {
font-size: 4em;
}
}
/*Rotating titles*/
.rw-words {
position: absolute;
text-align: center;
height: 25%;
width: 1140px;
top: 45%;
font-style: cursive;
font-family: serif;
-webkit-perspective: 800px;
perspective: 800px;
}
.rw-words span {
position: absolute;
width: 100%;
height: 50%;
text-align: center;
font-size: 100%;
float: right;
margin-left: -554px;
color: transparent;
margin-top: -13px;
text-shadow: 0px 0px 80px rgba(255, 255, 255, 1);
opacity: 0;
-webkit-animation: rotateWord 18s linear infinite 0s;
-ms-animation: rotateWord 18s linear infinite 0s;
animation: rotateWord 18s linear infinite 0s;
}
.rw-words span:nth-child(2) {
-webkit-animation-delay: 2s;
-ms-animation-delay: 2s;
animation-delay: 2s;
}
.rw-words span:nth-child(3) {
-webkit-animation-delay: 6s;
-ms-animation-delay: 6s;
animation-delay: 6s;
}
.rw-words span:nth-child(4) {
-webkit-animation-delay: 9s;
-ms-animation-delay: 9s;
animation-delay: 9s;
}
.rw-words span:nth-child(5) {
-webkit-animation-delay: 12s;
-ms-animation-delay: 12s;
animation-delay: 12s;
}
.rw-words span:nth-child(6) {
-webkit-animation-delay: 15s;
-ms-animation-delay: 15s;
animation-delay: 15s;
}
#-webkit-keyframes rotateWord {
0% {
opacity: 0;
-webkit-animation-timing-function: ease-in;
-webkit-transform: translateY(-200px) translateZ(300px) rotateY(-120deg);
}
5% {
opacity: 1;
-webkit-animation-timing-function: ease-out;
-webkit-transform: translateY(0px) translateZ(0px) rotateY(0deg);
}
6% {
text-shadow: 0px 0px 0px rgba(255, 255, 255, 1);
color: #fff;
}
17% {
opacity: 1;
text-shadow: 0px 0px 0px rgba(255, 255, 255, 1);
color: #fff;
}
20% {
opacity: 0;
}
100% {
opacity: 0;
}
}
#-ms-keyframes rotateWord {
0% {
opacity: 0;
-ms-animation-timing-function: ease-in;
-ms-transform: translateY(-200px) translateZ(300px) rotateY(-120deg);
}
5% {
opacity: 1;
-ms-animation-timing-function: ease-out;
-ms-transform: translateY(0px) translateZ(0px) rotateY(0deg);
}
6% {
text-shadow: 0px 0px 0px rgba(255, 255, 255, 1);
color: #fff;
}
17% {
opacity: 1;
text-shadow: 0px 0px 0px rgba(255, 255, 255, 1);
color: #fff;
}
20% {
opacity: 0;
}
100% {
opacity: 0;
}
}
#keyframes rotateWord {
0% {
opacity: 0;
-webkit-animation-timing-function: ease-in;
animation-timing-function: ease-in;
-webkit-transform: translateY(-200px) translateZ(300px) rotateY(-120deg);
transform: translateY(-200px) translateZ(300px) rotateY(-120deg);
}
5% {
opacity: 1;
-webkit-animation-timing-function: ease-out;
animation-timing-function: ease-out;
-webkit-transform: translateY(0px) translateZ(0px) rotateY(0deg);
transform: translateY(0px) translateZ(0px) rotateY(0deg);
}
6% {
text-shadow: 0px 0px 0px rgba(255, 255, 255, 1);
color: #fff;
}
17% {
opacity: 1;
text-shadow: 0px 0px 0px rgba(255, 255, 255, 1);
color: #fff;
}
20% {
opacity: 0;
}
100% {
opacity: 0;
}
}
#media screen and (max-width: 1060px) {
.rw-sentence > span:first-child {
font-size: 500%;
left: 0px;
}
.rw-sentence > span:nth-child(2) {
font-size: 200%;
top: 125px;
left: 30px;
}
.rw-sentence > span:nth-child(3) {
top: 175px;
left: 30px;
font-size: 235%;
}
.rw-words {
left: 95px;
top: 171px;
}
.rw-words span {
font-size: 250%;
}
.rw-sentence > span:last-child {
top: 240px;
left: 30px;
}
}
#media screen and (max-width: 400px) {
.rw-sentence > span:first-child {
font-size: 200%;
left: 0px;
}
.rw-sentence > span:nth-child(2) {
font-size: 100%;
top: 50px;
left: 10px;
}
.rw-sentence > span:nth-child(3) {
top: 76px;
left: 10px;
font-size: 120%;
}
.rw-words {
left: 45px;
top: 76px;
}
.rw-words span {
font-size: 120%;
}
.rw-sentence > span:last-child {
top: 106px;
left: 10px;
font-size: 100%;
}
}
<!DOCTYPE html>
<html lang="en" class="no-js">
<head>
<meta charset="UTF-8" />
<link rel="stylesheet" type="text/css" href="http://localhost/Project/css/normalize.css" />
<link rel="stylesheet" type="text/css" href="http://localhost/Project/css/component.css " />
</head>
<body>
<div class="container demo-1">
<div class="content">
<div id="large-header" class="large-header">
<canvas id="demo-canvas"></canvas>
<h1 class="main-title" style="font-family: initial;
font-style: initial;">Welcome to NextGen Ticketing <span class="thin" style="font-size:26px font-family:"fantasy" "><br/><font color="white" >Relieve yourself from</font></span>
<div class="rw-words">
<span>Queues</span>
<span>Inconvenience</span>
<span>Chisels</span>
<span>Register Today!</span>
</div> <br/><br/><span class="thin"><br/>Let's get Registered by<br/>Clicking here</span>
<span><p style="font-family: initial;
font-size: x-large;
font-style: normal;
font-weight: 600;">Refill wallet here</p></div></span></h1>
</h1>
Refill wallet here
</div>
</h1>
</div>
</div>
</div>
<!-- /container -->
<script src="js/TweenLite.min.js"></script>
<script src="js/EasePack.min.js"></script>
<script src="js/rAF.js"></script>
<script src="js/demo-1.js"></script>
</body>
</html>