How to add a class to trigger a transition at the start - css

I was just told this:
I'm not adding a class to trigger a transition at the start
How is that fixed in the code?
How do I have the ticker fade in on page load and fade out when the button is clicked?
code https://jsfiddle.net/3r2gv460/
When the button is clicked it doesn't fade out.
Ticker fade in
.video-one {
display: flex;
align-items: flex-end;
}
.alert {
transition: opacity 4s ease 0s;
opacity: 0;
}
.video-one.slide .alert {
opacity: 1;
transition-delay: 10.5s;
}
.slide .video-one .alert {
opacity: 0;
transition: opacity 4s ease 0s;
}
Sliding door animation
.video-one {
top: 0;
transform: translateY(calc(-100% - 1px));
animation: curtainDown 10s ease-in 1s forwards;
}
#keyframes curtainDown {
to {
transform: translateY(0%);
}
}
.curtain.slide .video-one {
transform: translateY(0%);
animation: curtainUp 8s ease-in 3s forwards;
}
#keyframes curtainUp {
to {
transform: translateY(calc(-100% - 1px));
}
}
What seems to be the issue, and how would this be fixed or adjusted?
What I should be seeing:
const manageCover = (function makeManageCover() {
function show(el) {
el.classList.remove("hide");
}
function hide(el) {
el.classList.add("hide");
}
function openCurtain(cover) {
hide(cover);
const curtain = document.querySelector(".curtain");
curtain.classList.add("slide");
return curtain;
}
function showVideo(curtain) {
const thewrap = curtain.parentElement.querySelector(".wrap");
show(thewrap);
}
function coverClickHandler(evt) {
const cover = evt.currentTarget;
const curtain = openCurtain(cover);
showVideo(curtain);
cover.dispatchEvent(new Event("afterClick"));
}
function init(callback) {
const cover = document.querySelector(".play");
cover.addEventListener("click", coverClickHandler);
cover.addEventListener("afterClick", callback);
}
return {
init
};
}());
const videoPlayer = (function makeVideoPlayer() {
let playlist;
let player;
function loadIframeScript() {
const tag = document.createElement("script");
tag.src = "https://www.youtube.com/iframe_api";
const firstScriptTag = document.getElementsByTagName("script")[0];
firstScriptTag.parentNode.insertBefore(tag, firstScriptTag);
}
function onYouTubeIframeAPIReady() {
const cover = document.querySelector(".play");
const wrapper = cover.parentElement;
const frameContainer = wrapper.querySelector(".video");
addPlayer(frameContainer, playlist);
}
function shufflePlaylist(player) {
player.setShuffle(true);
player.playVideoAt(0);
player.stopVideo();
}
function onPlayerReady(event) {
player = event.target;
player.setVolume(100);
shufflePlaylist(player);
}
function createPlaylist(videoIds) {
return videoIds.join();
}
function createOptions(videoIds) {
const options = {
height: 360,
host: "https://www.youtube-nocookie.com",
width: 640
};
options.playerVars = {
autoplay: 0,
cc_load_policy: 0,
controls: 1,
disablekb: 1,
fs: 0,
iv_load_policy: 3,
rel: 0
};
options.events = {
"onReady": onPlayerReady
};
options.playerVars.loop = 1;
options.playerVars.playlist = createPlaylist(videoIds);
return options;
}
function createVideoOptions(ids) {
const options = createOptions(ids);
return options;
}
function addPlayer(video, ids) {
const options = createVideoOptions(ids);
player = new YT.Player(video, options);
return player;
}
function play() {
if (player && player.playVideo) {
player.playVideo();
}
}
function init(videoIds) {
player = null;
loadIframeScript();
window.onYouTubeIframeAPIReady = onYouTubeIframeAPIReady;
playlist = videoIds;
return play;
}
return {
init,
play
};
}());
manageCover.init(videoPlayer.init([
"0dgNc5S8cLI",
]));
html,
body {
height: 100%;
margin: 0;
padding: 0;
}
body {
}
.container {
position: absolute;
left: 0;
right: 0;
min-height: 100%;
min-width: 255px;
display: flex;
padding: 8px 8px;
}
.curtain {
flex: 1 0 0;
margin: auto;
max-width: 640px;
border: 21px solid;
border-radius: 3.2px;
border-color: #000 #101010 #000 #101010;
position: relative;
}
.curtain::before {
content: '';
position: absolute;
top: -2px;
left: -2px;
right: -2px;
bottom: -2px;
background: #0a0a0a;
border: 1px solid;
border-color: #000 #101010 #000 #101010;
;
}
.curtain::after {
content: "";
position: absolute;
left: 0;
right: 0;
bottom: 0;
top: 0;
outline: 1px solid #f91f6e;
pointer-events: none;
}
.curtain.slide::after {
outline: 1px solid #0059dd;
transition: outline 2s ease-in;
/* add this */
/*background-image: none;*/
}
:root {
--wide: 32px;
--angle1: 0;
--angle2: -90;
}
.video-one {
position: absolute;
height: 100%;
width: 100%;
top: 0;
background: repeating-linear-gradient(calc(var(--angle1) * 1deg), #ffffff00 0, #ffffff00 var(--wide), #ffffff1a calc(var(--wide) + 1px), #0000004d calc(var(--wide) + 2px), #ffffff00 calc(var(--wide) + 5px)), repeating-linear-gradient(calc(calc(var(--angle2) + 90) * 1deg), #ffffff00 0, #ffffff00 var(--wide), #ffffff1a calc(var(--wide) + 1px), #0000004d calc(var(--wide) + 2px), #ffffff00 calc(var(--wide) + 5px));
background-color: #222;
border-bottom: 2px solid red;
background-repeat: no-repeat;
z-index: 0;
}
.video-one::after {
content: "";
position: absolute;
left: 0;
right: 0;
bottom: 0;
top: 0;
background: url("https://via.placeholder.com/264x264");
background-position: center;
/*background-size: 41.25% 73.33%;*/
background-size: 41.25% 79.52%;
background-repeat: no-repeat;
z-index: -1;
}
.ratio-keeper {
position: relative;
height: 0;
padding-top: 56.25%;
margin: auto;
overflow: hidden;
}
.play {
-webkit-appearance: none;
appearance: none;
position: absolute;
top: 0;
left: 0;
bottom: 0;
right: 0;
margin: auto;
display: flex;
justify-content: center;
align-items: center;
width: 90px;
height: 90px;
border-radius: 50%;
cursor: pointer;
border: 9px solid;
z-index: 1;
background: transparent;
filter: drop-shadow(3px 3px 3px #000000b3);
border-color: blue;
animation: fadeInPlay 2s ease-in 2s forwards;
animation-delay: 10s;
opacity: 0;
cursor: default;
pointer-events: none;
}
#keyframes fadeInPlay {
0% {
opacity: 0;
}
99.9% {
opacity: 1;
pointer-events: none;
}
100% {
opacity: 1;
cursor: pointer;
pointer-events: initial;
}
}
.play::before {
content: "";
width: 0;
height: 0;
border-top: 20px solid transparent;
border-bottom: 20px solid transparent;
border-left: 27px solid;
transform: translateX(4px);
border-left-color: blue;
}
.play:hover {
box-shadow: 0 0 0 5px rgba(20, 179, 33, 0.5);
}
.play:focus {
outline: 0;
box-shadow: 0 0 0 5px rgba(111, 0, 255, 0.5);
}
.exit {
position: absolute;
top: auto;
bottom: -47.63px;
margin: auto;
right: 0;
left: 0;
width: 47px;
height: 47px;
cursor: pointer;
border-radius: 100%;
background: transparent;
border: 5px solid red;
box-sizing: border-box;
opacity: 0;
pointer-events: none;
clip-path: circle(50%);
}
.slide .exit {
animation: fadeInExit 4s forwards 7.5s;
}
#keyframes fadeInExit {
99% {
pointer-events: none;
}
100% {
pointer-events: initial;
opacity: 1;
}
}
.exit::before,
.exit::after {
content: "";
background-color: red;
width: 47px;
height: 5px;
position: absolute;
top: 0px;
left: -5px;
right: 0;
bottom: 0;
margin: auto;
}
.exit::before {
transform: rotate(45deg);
}
.exit::after {
transform: rotate(-45deg);
}
.hide {
display: none;
}
.video-one {
top: -101%;
/* for testing: fast */
transition: all 10s ease-in 0s;
transition-delay: 1s;
}
.video-one.slide {
top: 0%;
}
.curtain.slide .video-one {
transition-delay: 3s;
transform: translateY(calc(-100% - 1px));
}
.alert {
padding: 0px;
}
.bg-yellow {
background: #ffc000;
font-family: Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif;
font-weight: 900;
}
.alert .message {
width: 100%;
overflow: hidden;
position: relative;
margin-left: 0px;
color: #000;
font-size: 16px;
letter-spacing: -.2px;
line-height: 22px;
text-transform: uppercase;
}
.alert {
display: flex;
position: relative;
text-decoration: none;
}
.pill {
padding: 2px 6px;
font-size: 12px;
line-height: 18px;
text-transform: uppercase;
white-space: nowrap;
background: #000;
color: #fff;
}
.animate ul {
display: flex;
margin: 0;
padding: 0;
list-style: none;
}
.animate ul li {
height: 20px;
white-space: nowrap;
}
.text {
margin: 0 auto;
}
.alert .animate ul {
display: flex;
animation: 90s linear 0s infinite normal none running banner-scroll;
}
#keyframes banner-scroll {
0% {
transform: translateX(0px);
}
100% {
transform: translateX(-3738.5px);
}
}
.video-one {
display: flex;
align-items: flex-end;
}
.alert {
transition: opacity 4s ease 0s;
opacity: 0;
}
.video-one.slide .alert {
opacity: 1;
transition-delay: 10.5s;
}
.slide .video-one .alert {
opacity: 0;
transition: opacity 4s ease 0s;
}
.video-one {
top: 0;
transform: translateY(calc(-100% - 1px));
animation: curtainDown 10s ease-in 1s forwards;
}
#keyframes curtainDown {
to {
transform: translateY(0%);
}
}
.curtain.slide .video-one {
transform: translateY(0%);
animation: curtainUp 8s ease-in 3s forwards;
}
#keyframes curtainUp {
to {
transform: translateY(calc(-100% - 1px));
}
}
<div class="container">
<div class="curtain">
<div class="ratio-keeper">
<div class="video-one">
<div class="alert bg-yellow">
<div class="message animate">
<ul>
<li class="text msg-0">First message is displayed here lorem ipsum, dolor sit amet adispicing — </li>
<li class="text msg-1">Second Message Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent sed purus mi. Etiam et elit vulputate, venenatis nibh in, lobortis elit. Phasellus ullamcorper purus ut diam tincidunt venenatis. Sed tincidunt vestibulum malesuada. — </li>
<li class="text msg-2">Third message is shown scrolling here. — </li>
</ul>
</div>
</div>
</div>
</div>
</div>
<button class="play" type="button" aria-label="Open"></button>
</div>

This worked: https://jsfiddle.net/pezf60b5/
.alert {
animation: alerton 10s ease forwards;
opacity: 0;
}
/*
.video-one.slide .alert {
opacity: 1;
transition: opacity 4s ease 10.5s
}
*/
.slide .video-one .alert {
animation: alertoff 4s ease;
}
#keyframes alerton {
0% {
opacity: 0;
}
80% {
opacity: 0;
}
100% {
opacity: 1;
}
}
#keyframes alertoff {
0% {
opacity: 1;
}
100% {
opacity: 0;
}
}

Related

how to make owl carousel appear in all the pages of the blog

im really new at this but made owl carousel appear at the main page of my blog just the way i like it.
the thing is, now i want it to appear the same way in all the pages of the blog. is there a way i can make the call in the pages or anything i can add to the theme or main page so it can show it in all the articles?
i have it in the html of the theme like this
* ######## Top Feature Css ######################### */
.recent-boxes .carousel {
position: relative;
margin: 0 0 0!important;
padding: 0;
overflow: visible;
height: auto;
display: block;
clear: both
}
.owl-carousel .animated {
-webkit-animation-duration: 1000ms;
animation-duration: 1000ms;
-webkit-animation-fill-mode: both;
animation-fill-mode: both
}
.owl-carousel .owl-animated-in {
z-index: 0
}
.owl-carousel .owl-animated-out {
z-index: 1
}
.owl-carousel .fadeOut {
-webkit-animation-name: fadeOut;
animation-name: fadeOut
}
#-webkit-keyframes fadeOut {
0% {
opacity: 1
}
100% {
opacity: 0
}
}
#keyframes fadeOut {
0% {
opacity: 1
}
100% {
opacity: 0
}
}
.owl-height {
-webkit-transition: height 500ms ease-in-out;
-moz-transition: height 500ms ease-in-out;
-ms-transition: height 500ms ease-in-out;
-o-transition: height 500ms ease-in-out;
transition: height 500ms ease-in-out
}
.owl-carousel {
display: none;
width: 100%;
-webkit-tap-highlight-color: transparent;
position: relative;
z-index: 1
}
.owl-carousel .owl-stage {
position: relative;
-ms-touch-action: pan-Y
}
.owl-carousel .owl-stage:after {
content: ".";
display: block;
clear: both;
visibility: hidden;
line-height: 0;
height: 0
}
.owl-carousel .owl-stage-outer {
position: relative;
overflow: hidden;
-webkit-transform: translate3d(0px, 0px, 0px)
}
.owl-carousel .owl-controls .owl-nav .owl-prev,
.owl-carousel .owl-controls .owl-nav .owl-next,
.owl-carousel .owl-controls .owl-dot {
cursor: pointer;
cursor: hand;
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none
}
.owl-carousel.owl-loaded {
display: block
}
.owl-carousel.owl-loading {
opacity: 0;
display: block
}
.owl-carousel.owl-hidden {
opacity: 0
}
.owl-carousel .owl-refresh .owl-item {
display: none
}
.owl-carousel .owl-item {
position: relative;
min-height: 1px;
float: left;
-webkit-backface-visibility: hidden;
-webkit-tap-highlight-color: transparent;
-webkit-touch-callout: none;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none
}
.owl-carousel .owl-item img {
display: block;
width: 100%;
-webkit-transform-style: preserve-3d
}
.owl-carousel.owl-text-select-on .owl-item {
-webkit-user-select: auto;
-moz-user-select: auto;
-ms-user-select: auto;
user-select: auto
}
.owl-carousel .owl-grab {
cursor: move;
cursor: -webkit-grab;
cursor: -o-grab;
cursor: -ms-grab;
cursor: grab
}
.owl-carousel.owl-rtl {
direction: rtl
}
.owl-carousel.owl-rtl .owl-item {
float: right
}
.no-js .owl-carousel {
display: block
}
.owl-prev,
.owl-next {
top: 0;
color: #fff;
background-color: rgba(0, 0, 0, 0.75);
font-family: FontAwesome;
position: absolute;
z-index: 1;
display: block;
padding: 0;
cursor: pointer;
padding: 0;
text-align: center;
overflow: hidden
}
.owl-prev {
left: 0
}
.owl-prev:before {
content: "\f104"
}
.owl-next {
right: 0
}
.owl-next:before {
content: "\f105"
}
.owl-prev:hover,
.owl-next:hover {
background-color: #000
}
.owl-dots {
position: absolute;
bottom: 1px;
width: 33.33%;
left: 0;
right: 0;
margin: auto;
text-align: center
}
.owl-dot {
background: #fff;
height: 3px;
width: 10px;
display: inline-block;
margin: 0 5px;
-webkit-border-radius: 2px;
-moz-border-radius: 2px;
border-radius: 2px;
opacity: .6
}
.owl-dot.active,
.owl-dot:hover {
background: #e74c3c
}
.main-carousel {
height: 350px;
overflow: hidden
}
.main-carousel .owl-item {
width: 100%;
}
.carousel-item {
height: 350px;
width: 100%;
position: relative;
padding: 0!important;
display: block;
overflow: hidden
}
.carousel-item .box-image {
height: 350px;
position: relative;
width: 100%;
display: block
}
.carousel-item .box-image:after {
content: no-close-quote;
position: absolute;
left: 0;
bottom: 0;
width: 100%;
height: 151px;
background: url(http://3.bp.blogspot.com/-LnvazGBvKh8/VskckSkmzxI/AAAAAAAAC4s/erEgI6A_ih4/s1600-r/metabg.png) repeat-x;
opacity: .8
}
.carousel-content {
position: absolute;
bottom: 0;
width: 100%;
z-index: 2;
box-sizing: border-box
}
.carousel-item .carousel-content {
padding: 15px;
text-align: center;
}
.carousel-item .recent-title {
margin: 10px 0 5px;
font-size: 19px;
font-weight: 400
}
.carousel-item .recent-title a {
color: #fff;
display: block;
line-height: 1.4em;
text-shadow: 0 .5px .5px rgba(34, 34, 34, 0.3)
}
.carousel-item .recent-author {
color: #fff;
}
.carousel-item .recent-date {
visibility: hidden;
display: none;
}
.carousel-tag a {
display: inline-block;
background-color: #e74c3c;
color: #fff;
height: 20px;
line-height: 20px;
padding: 0 6px;
font-size: 11px;
text-transform: uppercase;
border-radius: 2px
}
.carousel-tag a:before {
content: "\f091";
font-family: FontAwesome;
font-weight: 400;
font-style: normal;
line-height: 1;
padding-right: 4px;
}
.recent-author::before {
content: '\f007';
font-family: fontawesome;
color: #bbb;
margin-right: 5px;
}
.recent-author {
margin-right: 10px;
}
.carousel-overlay {
position: absolute;
left: 0;
top: 0;
z-index: 1;
width: 100%;
height: 100%;
background-color: rgba(40, 35, 40, 0.05)
}
.main-carousel .owl-item:hover .carousel-overlay {
background-color: $mainbgcolor;
opacity:0.5;
}
.carousel-overlay:before {
z-index: 3;
border-top: 1px solid #fff;
border-bottom: 1px solid #fff;
-webkit-transform: scale(0,1);
transform: scale(0,1);
}
.carousel-overlay:after {
z-index: 3;
border-right: 1px solid #fff;
border-left: 1px solid #fff;
-webkit-transform: scale(1,0);
transform: scale(1,0);
}
.carousel-overlay:before, .carousel-overlay:after {
z-index: 3;
position: absolute;
top: 10px;
right: 10px;
bottom: 10px;
left: 10px;
content: '';
opacity: 0;
-webkit-transition: opacity 0.5s, -webkit-transform 0.5s;
transition: opacity 0.5s, transform 0.5s;
}
.main-carousel .owl-item:hover .carousel-overlay:before, .main-carousel .owl-item:hover .carousel-overlay:after {
opacity: 1;
-webkit-transform: scale(1);
transform: scale(1);
}
.main-carousel .owl-prev,
.main-carousel .owl-next {
margin-top: 0px;
width: 40px;
height: 40px;
font-size: 25px;
line-height: 40px
}
.main-carousel .owl-prev {
left: -50px
}
.main-carousel:hover .owl-prev {
left: 0
}
.main-carousel .owl-next {
right: -50px
}
.main-carousel:hover .owl-next {
right: 0
}
.main-carousel .owl-dots {
bottom: 10px
}

Draw a ring around a circle in Progress Tracker

How can I draw a ring around the circle in this progress tracker like on the image ring around circle
The progress tracker is based on http://nigelotoole.github.io/progress-tracker/
Here is the example https://codepen.io/anon/pen/JewMeM
The approach was with:
.progress-step.is-active .progress-marker {
background-color: #2196F3;
border: 2px solid #0e38b1;
}
There must be an empty/white space between the ring and the circle.
You can use some pseudo elements.
Try this
.progress-step.is-active .progress-marker::after {
content: "";
position: absolute;
border: 2px solid #0e38b1;
height: 22px;
width: 22px;
background: transparent;
border-radius: 100%;
}
.progress-tracker {
display: -webkit-box;
display: -ms-flexbox;
display: flex;
padding: 0;
list-style: none;
}
.progress-step {
display: block;
position: relative;
-webkit-box-flex: 1;
-ms-flex: 1 1 0%;
flex: 1 1 0%;
margin: 0;
padding: 0;
min-width: 28px;
}
.progress-step:last-child {
-webkit-box-flex: 0;
-ms-flex-positive: 0;
flex-grow: 0;
}
.progress-step:not(:last-child)::after {
content: '';
display: block;
position: absolute;
z-index: -10;
top: 6px;
bottom: 12px;
right: 0;
width: 100%;
height: 2px;
-webkit-transition: background-color 0.3s;
transition: background-color 0.3s;
}
.progress-step.is-active .progress-title {
font-weight: 400;
}
.progress-step > a {
display: block;
}
.progress-marker {
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-pack: center;
-ms-flex-pack: center;
justify-content: center;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
position: relative;
z-index: 20;
width: 10px;
height: 10px;
color: #fff;
font-weight: 400;
border: 2px solid transparent;
border-radius: 50%;
-webkit-transition: background-color, border-color;
transition: background-color, border-color;
-webkit-transition-duration: 0.3s;
transition-duration: 0.3s;
}
.progress-text {
display: block;
padding: 14px 9.3333333333px;
overflow: hidden;
text-overflow: ellipsis;
}
.progress-title {
margin-top: 0;
}
.progress-step .progress-marker {
color: #fff;
background-color: #0e38b1;
}
.progress-step::after {
background-color: #0e38b1;
}
.progress-step .progress-text, .progress-step .progress-step > a .progress-text {
color: #333333;
}
.progress-step.is-active .progress-marker {
background-color: #2196F3;
}
.progress-step.is-complete .progress-marker {
background-color: #1976D2;
}
.progress-step.is-complete::after {
background-color: #868686;
}
.progress-step:hover .progress-marker {
background-color: #56ADF5;
}
.progress-tracker--center .progress-step {
text-align: center;
}
.progress-tracker--center .progress-step:last-child {
-webkit-box-flex: 1;
-ms-flex-positive: 1;
flex-grow: 1;
}
.progress-tracker--center .progress-step::after {
right: -50%;
}
.progress-tracker--center .progress-marker {
margin-left: auto;
margin-right: auto;
}
.progress-tracker--right .progress-step {
text-align: right;
}
.progress-tracker--right .progress-step:last-child {
-webkit-box-flex: 1;
-ms-flex-positive: 1;
flex-grow: 1;
}
.progress-tracker--right .progress-step::after {
right: calc(-100% + 14px);
}
.progress-tracker--right .progress-marker {
margin-left: auto;
}
.progress-tracker--border {
padding: 5px;
border: 2px solid #868686;
border-radius: 38px;
}
.progress-tracker--spaced .progress-step::after {
width: calc(100% - 30px);
margin-right: 8px;
}
.progress-tracker--word {
padding-right: 38.6666666667px;
overflow: hidden;
}
.progress-tracker--word .progress-text {
display: inline-block;
white-space: nowrap;
}
.progress-tracker--word .progress-title {
margin: 0;
}
.progress-tracker--word-center {
padding-right: 38.6666666667px;
padding-left: 38.6666666667px;
}
.progress-tracker--word-center .progress-text {
padding-right: 0;
padding-left: 0;
-webkit-transform: translateX(calc(-50% + 14px));
transform: translateX(calc(-50% + 14px));
}
.progress-tracker--word-right {
padding-right: 0;
padding-left: 38.6666666667px;
}
.progress-tracker--word-right .progress-text {
padding-left: 0;
-webkit-transform: translateX(calc(-100% + 28px));
transform: translateX(calc(-100% + 28px));
}
.progress-tracker--text .progress-step:last-child {
-webkit-box-flex: 1;
-ms-flex-positive: 1;
flex-grow: 1;
}
.progress-tracker--text-top .progress-step::after {
top: auto;
}
.progress-tracker--text-top .progress-text {
height: 100%;
}
.progress-tracker--text-top .progress-marker {
bottom: 28px;
}
.progress-tracker--text-inline .progress-step {
display: -webkit-box;
display: -ms-flexbox;
display: flex;
}
.progress-tracker--text-inline .progress-text {
position: relative;
z-index: 30;
max-width: 70%;
white-space: nowrap;
padding-top: 0;
padding-bottom: 0;
background-color: #fff;
}
.progress-tracker--text-inline .progress-title {
margin: 0;
}
.progress-tracker--square .progress-step {
padding-top: 0;
}
.progress-tracker--square .progress-marker {
-webkit-transform: scaleX(0.33) translateY(-12px);
transform: scaleX(0.33) translateY(-12px);
border-radius: 0;
}
#media (max-width: 399px) {
.progress-tracker-mobile {
overflow-x: auto;
}
.progress-tracker-mobile .progress-tracker {
min-width: 200%;
}
}
.progress-tracker--vertical {
-webkit-box-orient: vertical;
-webkit-box-direction: normal;
-ms-flex-direction: column;
flex-direction: column;
}
.progress-tracker--vertical .progress-step {
-webkit-box-flex: 1;
-ms-flex: 1 1 auto;
flex: 1 1 auto;
}
.progress-tracker--vertical .progress-step::after {
right: auto;
top: 14px;
left: 12px;
width: 4px;
height: 100%;
}
.progress-tracker--vertical .progress-marker {
position: absolute;
left: 0;
}
.progress-tracker--vertical .progress-text {
padding-top: 7px;
padding-left: 42px;
}
.progress-tracker--vertical .progress-step:not(:last-child) .progress-text {
padding-bottom: 42px;
}
#-webkit-keyframes scale-up {
from {
opacity: 1;
-webkit-transform: translate(-50%, -50%) scale(0);
transform: translate(-50%, -50%) scale(0);
}
to {
opacity: 0;
-webkit-transform: translate(-50%, -50%) scale(1);
transform: translate(-50%, -50%) scale(1);
}
}
#keyframes scale-up {
from {
opacity: 1;
-webkit-transform: translate(-50%, -50%) scale(0);
transform: translate(-50%, -50%) scale(0);
}
to {
opacity: 0;
-webkit-transform: translate(-50%, -50%) scale(1);
transform: translate(-50%, -50%) scale(1);
}
}
.anim-ripple .progress-marker::before, .anim-ripple-large .progress-marker::before, .anim-ripple-splash .progress-marker::before {
content: "";
display: block;
width: 100%;
height: 100%;
position: absolute;
top: 50%;
left: 50%;
z-index: 30;
background: rgba(0, 0, 0, 0.3);
border-radius: 50%;
-webkit-transform: translate(-50%, -50%) scale(0);
transform: translate(-50%, -50%) scale(0);
visibility: hidden;
}
.anim-ripple :not(:active) .progress-marker::before, .anim-ripple-large :not(:active) .progress-marker::before, .anim-ripple-splash :not(:active) .progress-marker::before {
-webkit-animation: scale-up 0.3s ease-out;
animation: scale-up 0.3s ease-out;
}
.anim-ripple :focus .progress-marker::before, .anim-ripple-large :focus .progress-marker::before, .anim-ripple-splash :focus .progress-marker::before {
visibility: visible;
}
.anim-ripple-large .progress-marker::before {
width: 200%;
height: 200%;
}
.anim-ripple-splash .progress-marker::before {
width: 200%;
height: 200%;
box-shadow: 0 0 6px 6px rgba(0, 0, 0, 0.35);
}
.anim-ripple-double .progress-marker::before, .anim-ripple-double .progress-marker::after {
content: "";
display: block;
width: 100%;
height: 100%;
position: absolute;
top: 50%;
left: 50%;
z-index: 30;
background: rgba(0, 0, 0, 0.3);
border-radius: 50%;
-webkit-transform: translate(-50%, -50%) scale(0);
transform: translate(-50%, -50%) scale(0);
visibility: hidden;
background: none;
border: 3px solid rgba(0, 0, 0, 0.3);
}
.anim-ripple-double :not(:active) .progress-marker::before, .anim-ripple-double :not(:active) .progress-marker::after {
-webkit-animation: scale-up 0.3s ease-out 0s;
animation: scale-up 0.3s ease-out 0s;
}
.anim-ripple-double :not(:active) .progress-marker::after {
-webkit-animation-delay: 0.15s;
animation-delay: 0.15s;
}
.anim-ripple-double :focus .progress-marker::before, .anim-ripple-double :focus .progress-marker::after {
visibility: visible;
}
.anim-path .progress-step::after {
background-image: -webkit-linear-gradient(left, #0e38b1 50%, #868686 50%);
background-image: linear-gradient(to right, #0e38b1 50%, #868686 50%);
background-size: 200% 100%;
background-position: 0% 100%;
-webkit-transition: background-position 0.3s ease-out;
transition: background-position 0.3s ease-out;
}
.anim-path .progress-step.is-complete::after {
background-position: -100% 100%;
}
.progress-step.is-active .progress-marker::after {
content: "";
position: absolute;
border: 2px solid #0e38b1;
height: 22px;
width: 22px;
background: transparent;
border-radius: 100%;
}
<ul class="progress-tracker progress-tracker--spaced">
<li class="progress-step is-active">
<span class="progress-marker"></span>
</li>
<li class="progress-step">
<span class="progress-marker"></span>
</li>
<li class="progress-step">
<span class="progress-marker"></span>
</li>
<li class="progress-step">
<span class="progress-marker"></span>
</li>
<li class="progress-step">
<span class="progress-marker"></span>
</li>
</ul>
Updated pen: https://codepen.io/anon/pen/VVqQRw
If you are not willing to change the HTML structure of your progress tracket, the easiest way would be with a box-shadow IMO, like so :
box-shadow: 0 0 0 10px #FFF, 0 0 0 11px #000
The first box-shadow is going to be the color of the background (here set to 10px) and the second one is going to be the color of your border (here set to 11px so that it shows a 1px border). To change your border width or size simply adjust those two values.
Hope this helps !
I hope this works for you
<div class="cr1">
<div class="cr2">
</div>
</div>
.cr1{
border: 10px solid #bababa;
width: 232px;
border-radius: 50%;
}
.cr2{
background: #bababa;
width: 150px;
height: 150px;
border-radius: 56%;
display: inline-block;
border: 41px solid #fff;
}
Adding a box shadow will do the trick.
Change .progress-step.is-active .progress-marker to,
.progress-step.is-active .progress-marker {
background-color: #2196F3;
border: 3px solid #fff;
box-shadow: 0 0 0 2px #2196F3;
margin-top: -1px
}
Here's a working example: https://codepen.io/paddyfields/pen/GwPQPo
You can add border with :before selector
.progress-step.is-active .progress-marker:before {
content: "";
border: 2px solid #2196F3;
width: 20px;
height: 20px;
position: absolute;
border-radius: 100%
}
.progress-tracker {
display: -webkit-box;
display: -ms-flexbox;
display: flex;
padding: 0;
list-style: none;
}
.progress-step {
display: block;
position: relative;
-webkit-box-flex: 1;
-ms-flex: 1 1 0%;
flex: 1 1 0%;
margin: 0;
padding: 0;
min-width: 28px;
}
.progress-step:last-child {
-webkit-box-flex: 0;
-ms-flex-positive: 0;
flex-grow: 0;
}
.progress-step:not(:last-child)::after {
content: '';
display: block;
position: absolute;
z-index: -10;
top: 6px;
bottom: 12px;
right: 0;
width: 100%;
height: 2px;
-webkit-transition: background-color 0.3s;
transition: background-color 0.3s;
}
.progress-step.is-active .progress-title {
font-weight: 400;
}
.progress-step.is-active .progress-marker:before {
content: "";
border: 2px solid #2196F3;
width: 20px;
height: 20px;
position: absolute;
border-radius: 100%
}
.progress-step > a {
display: block;
}
.progress-marker {
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-pack: center;
-ms-flex-pack: center;
justify-content: center;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
position: relative;
z-index: 20;
width: 10px;
height: 10px;
color: #fff;
font-weight: 400;
border: 2px solid transparent;
border-radius: 50%;
-webkit-transition: background-color, border-color;
transition: background-color, border-color;
-webkit-transition-duration: 0.3s;
transition-duration: 0.3s;
}
.progress-text {
display: block;
padding: 14px 9.3333333333px;
overflow: hidden;
text-overflow: ellipsis;
}
.progress-title {
margin-top: 0;
}
.progress-step .progress-marker {
color: #fff;
background-color: #0e38b1;
}
.progress-step::after {
background-color: #0e38b1;
}
.progress-step .progress-text, .progress-step .progress-step > a .progress-text {
color: #333333;
}
.progress-step.is-active .progress-marker {
background-color: #2196F3;
}
.progress-step.is-complete .progress-marker {
background-color: #1976D2;
}
.progress-step.is-complete::after {
background-color: #868686;
}
.progress-step:hover .progress-marker {
background-color: #56ADF5;
}
.progress-tracker--center .progress-step {
text-align: center;
}
.progress-tracker--center .progress-step:last-child {
-webkit-box-flex: 1;
-ms-flex-positive: 1;
flex-grow: 1;
}
.progress-tracker--center .progress-step::after {
right: -50%;
}
.progress-tracker--center .progress-marker {
margin-left: auto;
margin-right: auto;
}
.progress-tracker--right .progress-step {
text-align: right;
}
.progress-tracker--right .progress-step:last-child {
-webkit-box-flex: 1;
-ms-flex-positive: 1;
flex-grow: 1;
}
.progress-tracker--right .progress-step::after {
right: calc(-100% + 14px);
}
.progress-tracker--right .progress-marker {
margin-left: auto;
}
.progress-tracker--border {
padding: 5px;
border: 2px solid #868686;
border-radius: 38px;
}
.progress-tracker--spaced .progress-step::after {
width: calc(100% - 30px);
margin-right: 8px;
}
.progress-tracker--word {
padding-right: 38.6666666667px;
overflow: hidden;
}
.progress-tracker--word .progress-text {
display: inline-block;
white-space: nowrap;
}
.progress-tracker--word .progress-title {
margin: 0;
}
.progress-tracker--word-center {
padding-right: 38.6666666667px;
padding-left: 38.6666666667px;
}
.progress-tracker--word-center .progress-text {
padding-right: 0;
padding-left: 0;
-webkit-transform: translateX(calc(-50% + 14px));
transform: translateX(calc(-50% + 14px));
}
.progress-tracker--word-right {
padding-right: 0;
padding-left: 38.6666666667px;
}
.progress-tracker--word-right .progress-text {
padding-left: 0;
-webkit-transform: translateX(calc(-100% + 28px));
transform: translateX(calc(-100% + 28px));
}
.progress-tracker--text .progress-step:last-child {
-webkit-box-flex: 1;
-ms-flex-positive: 1;
flex-grow: 1;
}
.progress-tracker--text-top .progress-step::after {
top: auto;
}
.progress-tracker--text-top .progress-text {
height: 100%;
}
.progress-tracker--text-top .progress-marker {
bottom: 28px;
}
.progress-tracker--text-inline .progress-step {
display: -webkit-box;
display: -ms-flexbox;
display: flex;
}
.progress-tracker--text-inline .progress-text {
position: relative;
z-index: 30;
max-width: 70%;
white-space: nowrap;
padding-top: 0;
padding-bottom: 0;
background-color: #fff;
}
.progress-tracker--text-inline .progress-title {
margin: 0;
}
.progress-tracker--square .progress-step {
padding-top: 0;
}
.progress-tracker--square .progress-marker {
-webkit-transform: scaleX(0.33) translateY(-12px);
transform: scaleX(0.33) translateY(-12px);
border-radius: 0;
}
#media (max-width: 399px) {
.progress-tracker-mobile {
overflow-x: auto;
}
.progress-tracker-mobile .progress-tracker {
min-width: 200%;
}
}
.progress-tracker--vertical {
-webkit-box-orient: vertical;
-webkit-box-direction: normal;
-ms-flex-direction: column;
flex-direction: column;
}
.progress-tracker--vertical .progress-step {
-webkit-box-flex: 1;
-ms-flex: 1 1 auto;
flex: 1 1 auto;
}
.progress-tracker--vertical .progress-step::after {
right: auto;
top: 14px;
left: 12px;
width: 4px;
height: 100%;
}
.progress-tracker--vertical .progress-marker {
position: absolute;
left: 0;
}
.progress-tracker--vertical .progress-text {
padding-top: 7px;
padding-left: 42px;
}
.progress-tracker--vertical .progress-step:not(:last-child) .progress-text {
padding-bottom: 42px;
}
#-webkit-keyframes scale-up {
from {
opacity: 1;
-webkit-transform: translate(-50%, -50%) scale(0);
transform: translate(-50%, -50%) scale(0);
}
to {
opacity: 0;
-webkit-transform: translate(-50%, -50%) scale(1);
transform: translate(-50%, -50%) scale(1);
}
}
#keyframes scale-up {
from {
opacity: 1;
-webkit-transform: translate(-50%, -50%) scale(0);
transform: translate(-50%, -50%) scale(0);
}
to {
opacity: 0;
-webkit-transform: translate(-50%, -50%) scale(1);
transform: translate(-50%, -50%) scale(1);
}
}
.anim-ripple .progress-marker::before, .anim-ripple-large .progress-marker::before, .anim-ripple-splash .progress-marker::before {
content: "";
display: block;
width: 100%;
height: 100%;
position: absolute;
top: 50%;
left: 50%;
z-index: 30;
background: rgba(0, 0, 0, 0.3);
border-radius: 50%;
-webkit-transform: translate(-50%, -50%) scale(0);
transform: translate(-50%, -50%) scale(0);
visibility: hidden;
}
.anim-ripple :not(:active) .progress-marker::before, .anim-ripple-large :not(:active) .progress-marker::before, .anim-ripple-splash :not(:active) .progress-marker::before {
-webkit-animation: scale-up 0.3s ease-out;
animation: scale-up 0.3s ease-out;
}
.anim-ripple :focus .progress-marker::before, .anim-ripple-large :focus .progress-marker::before, .anim-ripple-splash :focus .progress-marker::before {
visibility: visible;
}
.anim-ripple-large .progress-marker::before {
width: 200%;
height: 200%;
}
.anim-ripple-splash .progress-marker::before {
width: 200%;
height: 200%;
box-shadow: 0 0 6px 6px rgba(0, 0, 0, 0.35);
}
.anim-ripple-double .progress-marker::before, .anim-ripple-double .progress-marker::after {
content: "";
display: block;
width: 100%;
height: 100%;
position: absolute;
top: 50%;
left: 50%;
z-index: 30;
background: rgba(0, 0, 0, 0.3);
border-radius: 50%;
-webkit-transform: translate(-50%, -50%) scale(0);
transform: translate(-50%, -50%) scale(0);
visibility: hidden;
background: none;
border: 3px solid rgba(0, 0, 0, 0.3);
}
.anim-ripple-double :not(:active) .progress-marker::before, .anim-ripple-double :not(:active) .progress-marker::after {
-webkit-animation: scale-up 0.3s ease-out 0s;
animation: scale-up 0.3s ease-out 0s;
}
.anim-ripple-double :not(:active) .progress-marker::after {
-webkit-animation-delay: 0.15s;
animation-delay: 0.15s;
}
.anim-ripple-double :focus .progress-marker::before, .anim-ripple-double :focus .progress-marker::after {
visibility: visible;
}
.anim-path .progress-step::after {
background-image: -webkit-linear-gradient(left, #0e38b1 50%, #868686 50%);
background-image: linear-gradient(to right, #0e38b1 50%, #868686 50%);
background-size: 200% 100%;
background-position: 0% 100%;
-webkit-transition: background-position 0.3s ease-out;
transition: background-position 0.3s ease-out;
}
.anim-path .progress-step.is-complete::after {
background-position: -100% 100%;
}
<ul class="progress-tracker progress-tracker--spaced">
<li class="progress-step is-active">
<span class="progress-marker"></span>
</li>
<li class="progress-step">
<span class="progress-marker"></span>
</li>
<li class="progress-step">
<span class="progress-marker"></span>
</li>
<li class="progress-step">
<span class="progress-marker"></span>
</li>
<li class="progress-step">
<span class="progress-marker"></span>
</li>
</ul>

Body is not filling the whole page

My body no matter how hard I try wont get any bigger than a small line on the top of my page, I've tried just about everything so if someone could help me maybe something is wrong with my css i'm not seeing let me know
html {
height: 100%;
}
#wrapper {
height: 100%;
position: relative;
overflow: hidden;
}
body {
color: #fff;
margin: 0;
padding: 0;
position: relative;
}
.rw-wrapper {
width: 80%;
position: fixed;
margin: 110px auto 0 auto;
font-family: 'Cinzel Decorative', cursive;
padding: 30px;
font-size: 20px;
margin-left: 40px;
margin-top: 138px;
}
.rw-sentence {
margin: 0;
text-align: left;
text-shadow: 2px 2px 2px rgba(255, 255, 255, 0, 0.8);
}
.rw-sentence span {
color: white;
white-space: nowrap;
font-size: 200%;
font-weight: normal;
}
.rw-words {
display: inline;
text-indent: 10px;
}
.rw-words span {
position: absolute;
opacity: 0;
overflow: hidden;
width: 100%;
color: #F13D19;
}
.rw-words-1 span {
animation: rotateWordsFirst 18s linear infinite 0s;
}
.rw-words-2 span {
animation: rotateWordsSecond 18s linear infinite 0s;
}
.rw-words span:nth-child(2) {
animation-delay: 3s;
color: #11B61B;
}
.rw-words span:nth-child(3) {
animation-delay: 6s;
color: #2CCBC1;
}
.rw-words span:nth-child(4) {
animation-delay: 9s;
color: #7a6b9d;
}
.rw-words span:nth-child(5) {
animation-delay: 12s;
color: #E91313;
}
.rw-words span:nth-child(6) {
animation-delay: 15s;
color: white;
}
.rw-hero {
font-style: bold;
font-size: 75px;
}
#keyframes rotateWordsFirst {
0% {
opacity: 1;
animation-timing-function: ease-in;
height: 0px;
}
8% {
opacity: 1;
height: 60px;
}
19% {
opacity: 1;
height: 60px;
}
25% {
opacity: 0;
height: 60px;
}
100% {
opacity: 0;
}
}
#keyframes rotateWordsSecond {
0% {
opacity: 1;
animation-timing-function: ease-in;
width: 0px;
}
10% {
opacity: 0.3;
width: 0px;
}
20% {
opacity: 1;
width: 100%;
}
27% {
opacity: 0;
width: 100%;
}
100% {
opacity: 0;
}
}
img {
position: fixed;
top: 25px;
left: 25px;
min-width: 97.5%;
margin: 0;
padding: 0;
z-index: -1;
}
.words {
text-align: left;
padding-top: 160px;
padding-left: 0px;
}
#ap {
position: absolute;
width: 1860;
height: 200px;
z-index: 15;
top: 81.5%;
left: 9s.5%;
margin: -100px 0 0 -150px;
padding: 0;
text-align: center;
color: white;
}
<!DOCTYPE html>
<html>
<head>
<title>Neverwinter Beginners Guide</title>
<meta charset="utf-8">
<link href="css/styles.css" rel="stylesheet" type="text/css" media="all">
<link href="https://fonts.googleapis.com/css?family=Cinzel+Decorative:700" rel="stylesheet">
<script type="text/javascript" src="scripts/scripts.js"></script>
<img class="img" src="images/full_drag.png">
</head>
<body id="wrapper">
<div class="words">
<section class="rw-wrapper">
<h2 class="rw-sentence">
<span>Are you a</span>
<div class="rw-words rw-words-1">
<span>Fighter?</span>
<span>Hunter?</span>
<span>Paladin?</span>
<span>Wizard?</span>
<span>Rogue?</span>
<span class="rw-hero">Hero?</span>
</div>
</h2>
</section>
</div>
gnkrsjl;l
</body>
</html>

Z-index issue using transform scale

I have a codepen below. Basically, I'm trying to show a popup on hover of the highlighted circles (red), however some highlighted circles are showing up above some of the popups, even when the popups are always given a higher z-index all the time.
http://codepen.io/Wolfmans55/pen/jPwKqZ
This is the animation used for the popup, which I believe maybe the culprit.
#-webkit-keyframes popup {
0% {
transform: scale(2.5);
}
100% {
transform: scale(0);
}
}
Take out the z-index setting on .white-popup and set a higher z-index on .white-popup:hover .popup and .white:hover.
see jsfiddle
#import url(http://fonts.googleapis.com/css?family=Roboto);
body,
html {
height: 100%;
}
body {
background: #343837;
transition: opacity .25s;
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";
overflow: hidden;
}
.show-body {
opacity: 1;
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=100)";
}
.page {
background: #343837;
font-family: 'Roboto', sans-serif;
font-size: 100%;
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
transition: all 1s;
}
.page-2 {
left: auto;
right: -100%;
background: blue;
}
.prev-page,
.next-page {
position: absolute;
top: 50%;
width: 50px;
height: 50px;
background: red;
}
.next-page {
right: 20px;
}
.prev-page {
left: 20px;
}
.page-wrapper {
position: absolute;
top: 50%;
margin-top: -303px;
width: 100%;
}
.header_section {
text-shadow: 1px 1px 1px #000;
font-size: 2em;
}
h1 {
margin: 0;
}
.blue_title {
color: #54c8e7;
font-weight: normal;
}
.primary_title {
font-size: 4em;
margin-top: -34px;
margin-bottom: 20px;
}
.sub_title {
position: relative;
font-size: 1em;
background: #343837;
padding: 0 4px;
display: inline-block;
}
.sub_title_divider {
border-top: 1px solid #54c8e7;;
position: absolute;
top: 20px;
left: 0;
width: 100%;
}
.city-name {
font-size: 2em;
}
.emphasis {
font-weight: bold;
}
.inlineblock {
display: inline-block;
}
.centertxt {
text-align: center;
}
.pos_rel {
position: relative;
}
.overflow_hidden {
overflow: hidden;
}
.vert_mid {
vertical-align: middle;
}
table {
cursor: pointer;
margin: 0 auto;
border-spacing: 1px;
}
td {
width: 10px;
height: 10px;
border-radius: 50%;
}
.white,
.white-popup {
background: #000;
position: relative;
-webkit-animation: in .25s;
}
.white-popup {
background: red;
}
/*.plan-to {
background: #018c9e;
z-index: 2;
}*/
.white-popup .popup {
cursor: auto;
-webkit-animation: popup .25s forwards;
z-index: 10;
}
.popup {
position: absolute;
width: 100px;
height: 100px;
font-size: 5px;
overflow: hidden;
background: #54c8e7;
z-index:10;
top: -45px;
left: -45px;
padding: 8px;
border: 1px solid #343837;
border-radius: 3px;
box-sizing: border-box;
}
.white-popup:hover .popup {
-webkit-animation: out .25s forwards;
z-index: 50;
}
.white:hover {
-webkit-animation: out .25s forwards;
z-index: 50;
}
#-webkit-keyframes in {
from {background:#fff; transform: scale(1);}
to {background: #54c8e7; transform: scale(2.5);}
}
#-webkit-keyframes out {
0% {background:#fff; transform: scale(1);}
100% {background: #54c8e7; transform: scale(2.5);}
}
#-webkit-keyframes popup {
0% {
transform: scale(2.5);
}
100% {
transform: scale(0);
}
}
.key {
height: 15px;
width: 15px;
border-radius: 50%;
border: 1px solid #ccc;
margin-right: 2px;
}
.key_1 {
background: #54c8e7;
}
.key_2 {
background: #018c9e;
}
.key_3 {
background: #fff;
}
.legend {
text-transform:uppercase;
font-size: 12px;
color: #fff;
margin-bottom: 30px;
}
.legend_item {
margin-left: 15px;
}
#media screen and (min-width: 768px) {
.page-wrapper {
margin-top: -388px;
}
td {
width: 15px;
height: 15px;
}
}
I added the following CSS:
td:hover {
z-index: 1;
}
And inside .white-popup selector, I removed:
z-index: 2;
line.
Seems to work for me.

CSS Concentric Ring Animation

I saw a concentric ring animation on another site and set out to build it myself. I am stuck on two issues:
1) How can I reverse the transition so that when you hover off the rings scale and fade out backwards?
2) Any ideas on how to make the animation appear more smoothly? It feels like it happens too rigidly, if that makes sense.
http://codepen.io/mtorosian/pen/jEYwRy
<div class="container group">
<div class="rings">
<div id="main-circle">
<div id="inner-circle"></div>
</div>
<div id="ring1"></div>
<div id="ring2"></div>
<div id="ring3"></div>
<div id="ring4"></div>
<div id="ring5"></div>
</div>
</div>
And Here is the CSS:
html {
box-sizing: border-box;
}
*, *:before, *:after {
box-sizing: inherit;
}
body {
background-color: #fff;
font-size: 100%;
line-height: 1.5;
padding: 2.5em 0;
}
.container {
margin: 0 auto;
width: 90%;
max-width: 1200px;
padding: 3em 0;
}
.group:after {
content: "";
display: table;
clear: both;
}
.rings {
margin: 0 auto;
position: relative;
width: 200px;
height: 200px;
}
.rings:hover #ring1, .rings:hover #ring2, .rings:hover #ring3, .rings:hover #ring4, .rings:hover #ring5 {
transform: scale(1);
opacity: 1;
}
.rings:hover #ring1 {
transition-delay: 0.2s;
}
.rings:hover #ring2 {
transition-delay: 0.4s;
}
.rings:hover #ring3 {
transition-delay: 0.6s;
}
.rings:hover #ring4 {
transition-delay: 0.8s;
}
.rings:hover #ring5 {
transition-delay: 1s;
}
#main-circle {
background-color: #75a347;
border: 1px solid #ccc;
border-radius: 50%;
position: absolute;
top: 50%;
left: 50%;
margin-left: -12.5%;
margin-top: -12.5%;
width: 25%;
height: 25%;
}
#inner-circle{
background-color: #ededed;
border-radius: 50%;
margin: 25% 0 0 25%;
position: absolute;
width: 50%;
height: 50%;
}
#ring1, #ring2, #ring3, #ring4, #ring5 {
border: 1px solid #ededed;
border-radius: 50%;
position: absolute;
top: 50%;
left: 50%;
opacity: 0;
}
#mixin ring-size-position($top, $left, $width, $height) {
margin-top: $top;
margin-left: $left;
width: $width;
height: $height;
}
#ring1 {
#include ring-size-position(-20%, -20%, 40%, 40%);
}
#ring2 {
#include ring-size-position(-27.5%, -27.5%, 55%, 55%);
}
#ring3 {
#include ring-size-position(-35%, -35%, 70%, 70%);
}
#ring4 {
#include ring-size-position(-42.5%, -42.5%, 85%, 85%);
}
#ring5 {
#include ring-size-position(-50%, -50%, 100%, 100%);
}
Got it with cubic-bezier:
HTML:
<div class="container group">
<div class="ring-wrapper">
<div id="main-circle">
<div id="inner-circle"></div>
</div>
<div id="ring1"></div>
<div id="ring2"></div>
<div id="ring3"></div>
<div id="ring4"></div>
<div id="ring5"></div>
</div>
</div>
And the SCSS:
html {
box-sizing: border-box;
}
*, *:before, *:after {
box-sizing: inherit;
}
body {
background-color: #fff;
font-size: 100%;
line-height: 1.5;
padding: 2.5em 0;
}
.container {
margin: 0 auto;
width: 90%;
max-width: 1200px;
padding: 3em 0;
}
.group:after {
content: "";
display: table;
clear: both;
}
.ring-wrapper {
margin: 0 auto;
position: relative;
width: 200px;
height: 200px;
}
.ring-wrapper:hover #main-circle {
border: 1px solid #fff;
}
// Initial main green circle with inner white circle
#main-circle {
background-color: #54bc99;
border: 1px solid #ccc;
border-radius: 50%;
position: absolute;
top: 50%;
left: 50%;
margin-left: -12.5%;
margin-top: -12.5%;
width: 25%;
height: 25%;
z-index: 6;
}
#inner-circle{
background-color: #ededed;
border-radius: 50%;
margin: 25% 0 0 25%;
position: absolute;
width: 50%;
height: 50%;
}
// Iterate through and add properties and handle delay
#for $i from 1 through 5 {
#ring#{$i} {
border: 1px solid #ededed;
border-radius: 50%;
position: absolute;
top: 50%;
left: 50%;
opacity: 0;
transform: scale(0);
transition: all 0.5s cubic-bezier(1.000, 0.000, 0.000, 1.000);
/* cubic-bezier above = easeInOutExpo from http://matthewlein.com/ceaser/ */
transition-delay: (#{$i * 0.2s});
}
}
// Create mixin for repeated ring properties
#mixin ring-size-position($top, $left, $width, $height, $z) {
margin-top: $top;
margin-left: $left;
width: $width;
height: $height;
z-index: $z;
}
#ring1 {
background-color: #54bc99;
#include ring-size-position(-20%, -20%, 40%, 40%, 5);
}
#ring2 {
#include ring-size-position(-27.5%, -27.5%, 55%, 55%, 4);
}
#ring3 {
#include ring-size-position(-35%, -35%, 70%, 70%, 3);
}
#ring4 {
#include ring-size-position(-42.5%, -42.5%, 85%, 85%, 2);
}
#ring5 {
#include ring-size-position(-50%, -50%, 100%, 100%, 1);
}
// Create list of delays and iterate with #each loop
$delays-list: 0.2s 0.4s 0.6s 0.8s 1s;
#each $current-delay in $delays-list {
$i: index($delays-list, $current-delay);
.ring-wrapper:hover #ring#{$i} {
opacity: 1;
transform: scale(1);
transition-delay: $current-delay;
}
}

Resources