CSS: How can I separate this CSS snippet? - css

I've found a code snippet but I can't separate it. The problem is that my page can't understand this type of css so is there a way to separate it into normal CSS without the & etc.?
.f-modal-alert .f-modal-icon {
border-radius: 50%;
border: 4px solid gray;
box-sizing: content-box;
height: 80px;
margin: 20px auto;
padding: 0;
position: relative;
width: 80px;
// Success icon
&.f-modal-success,
&.f-modal-error {
border-color: #004;
&:after,
&:before {
background: #fff;
content: '';
height: 120px;
position: absolute;
transform: rotate(45deg);
width: 60px;
}
&:before {
border-radius: 120px 0 0 120px;
left: -33px;
top: -7px;
transform-origin: 60px 60px;
transform: rotate(-45deg);
}
&:after {
border-radius: 0 120px 120px 0;
left: 30px;
top: -11px;
transform-origin: 0 60px;
transform: rotate(-45deg);
}
.f-modal-placeholder {
border-radius: 50%;
border: 4px solid rgba(0, 222, 180, .5);
box-sizing: content-box;
height: 80px;
left: -4px;
position: absolute;
top: -4px;
width: 80px;
z-index: 2;
}
.f-modal-fix {
background-color: #fff;
height: 90px;
left: 28px;
position: absolute;
top: 8px;
transform: rotate(-45deg);
width: 5px;
z-index: 1;
}
.f-modal-line {
background-color: #00deb4;
border-radius: 2px;
display: block;
height: 5px;
position: absolute;
z-index: 2;
&.f-modal-tip {
left: 14px;
top: 46px;
transform: rotate(45deg);
width: 25px;
}
&.f-modal-long {
right: 8px;
top: 38px;
transform: rotate(-45deg);
width: 47px;
}
}
}
// Error icon
&.f-modal-error {
border-color: #abc;
.f-modal-x-mark {
display: block;
position: relative;
z-index: 2;
}
.f-modal-placeholder {
border: 4px solid rgba(170, 0, 0, .5);
}
.f-modal-line {
background-color: #aa0000;
top: 37px;
width: 47px;
&.f-modal-left {
left: 17px;
transform: rotate(45deg);
}
&.f-modal-right {
right: 16px;
transform: rotate(-45deg);
}
}
}
}
.animateSuccessTip {
animation: animateSuccessTip .75s;
}
.animateSuccessLong {
animation: animateSuccessLong .75s;
}
.f-modal-icon.f-modal-success.animate:after {
animation: rotatePlaceholder 4.25s ease-in;
}
.f-modal-icon.f-modal-error.animate:after {
animation: rotatePlaceholder 4.25s ease-in;
}
.animateErrorIcon {
animation: animateErrorIcon .5s;
}
.animateXLeft {
animation: animateXLeft .75s;
}
.animateXRight {
animation: animateXRight .75s;
}

It's written in Sass/Scss, a CSS preprocessor. It is a scripting language that extends CSS. Sass/Scss must be compiled into CSS, for the browser to understand it.
To convert it into CSS, you should have a proper Sass/Scss compiler, watching your changes, and compiling your Sass/Scss into CSS on the fly. Or you can run it manually in an online Sass/Scss to CSS converter, like this one: https://www.cssportal.com/scss-to-css/
So you would get a normal CSS:
.f-modal-alert .f-modal-icon {
border-radius: 50%;
border: 4px solid gray;
box-sizing: content-box;
height: 80px;
margin: 20px auto;
padding: 0;
position: relative;
width: 80px;
}
.f-modal-alert .f-modal-icon.f-modal-success, .f-modal-alert .f-modal-icon.f-modal-error {
border-color: #004;
}
.f-modal-alert .f-modal-icon.f-modal-success:after, .f-modal-alert .f-modal-icon.f-modal-error:after, .f-modal-alert .f-modal-icon.f-modal-success:before, .f-modal-alert .f-modal-icon.f-modal-error:before {
background: #fff;
content: '';
height: 120px;
position: absolute;
transform: rotate(45deg);
width: 60px;
}
.f-modal-alert .f-modal-icon.f-modal-success:before, .f-modal-alert .f-modal-icon.f-modal-error:before {
border-radius: 120px 0 0 120px;
left: -33px;
top: -7px;
transform-origin: 60px 60px;
transform: rotate(-45deg);
}
.f-modal-alert .f-modal-icon.f-modal-success:after, .f-modal-alert .f-modal-icon.f-modal-error:after {
border-radius: 0 120px 120px 0;
left: 30px;
top: -11px;
transform-origin: 0 60px;
transform: rotate(-45deg);
}
.f-modal-alert .f-modal-icon.f-modal-success .f-modal-placeholder, .f-modal-alert .f-modal-icon.f-modal-error .f-modal-placeholder {
border-radius: 50%;
border: 4px solid rgba(0, 222, 180, .5);
box-sizing: content-box;
height: 80px;
left: -4px;
position: absolute;
top: -4px;
width: 80px;
z-index: 2;
}
.f-modal-alert .f-modal-icon.f-modal-success .f-modal-fix, .f-modal-alert .f-modal-icon.f-modal-error .f-modal-fix {
background-color: #fff;
height: 90px;
left: 28px;
position: absolute;
top: 8px;
transform: rotate(-45deg);
width: 5px;
z-index: 1;
}
.f-modal-alert .f-modal-icon.f-modal-success .f-modal-line, .f-modal-alert .f-modal-icon.f-modal-error .f-modal-line {
background-color: #00deb4;
border-radius: 2px;
display: block;
height: 5px;
position: absolute;
z-index: 2;
}
.f-modal-alert .f-modal-icon.f-modal-success .f-modal-line.f-modal-tip, .f-modal-alert .f-modal-icon.f-modal-error .f-modal-line.f-modal-tip {
left: 14px;
top: 46px;
transform: rotate(45deg);
width: 25px;
}
.f-modal-alert .f-modal-icon.f-modal-success .f-modal-line.f-modal-long, .f-modal-alert .f-modal-icon.f-modal-error .f-modal-line.f-modal-long {
right: 8px;
top: 38px;
transform: rotate(-45deg);
width: 47px;
}
.f-modal-alert .f-modal-icon.f-modal-error {
border-color: #abc;
}
.f-modal-alert .f-modal-icon.f-modal-error .f-modal-x-mark {
display: block;
position: relative;
z-index: 2;
}
.f-modal-alert .f-modal-icon.f-modal-error .f-modal-placeholder {
border: 4px solid rgba(170, 0, 0, .5);
}
.f-modal-alert .f-modal-icon.f-modal-error .f-modal-line {
background-color: #a00;
top: 37px;
width: 47px;
}
.f-modal-alert .f-modal-icon.f-modal-error .f-modal-line.f-modal-left {
left: 17px;
transform: rotate(45deg);
}
.f-modal-alert .f-modal-icon.f-modal-error .f-modal-line.f-modal-right {
right: 16px;
transform: rotate(-45deg);
}
.animateSuccessTip {
animation: animateSuccessTip 0.75s;
}
.animateSuccessLong {
animation: animateSuccessLong 0.75s;
}
.f-modal-icon.f-modal-success.animate:after {
animation: rotatePlaceholder 4.25s ease-in;
}
.f-modal-icon.f-modal-error.animate:after {
animation: rotatePlaceholder 4.25s ease-in;
}
.animateErrorIcon {
animation: animateErrorIcon 0.5s;
}
.animateXLeft {
animation: animateXLeft 0.75s;
}
.animateXRight {
animation: animateXRight 0.75s;
}

Related

How to place line underneath the circle? without z-index

I made an X with a circle using css.
There is a green line that is sticking out on top of the circle, how do I place it under the circle?
How would this be done?
code: https://jsfiddle.net/6wod3pLm/
That is all I am doing in the code.
.exitnew {
-webkit-appearance: none;
appearance: none;
position: relative;
box-sizing: border-box;
margin: auto;
padding: 0;
width: 48px;
height: 48px;
cursor: pointer;
background: blue;
border: none;
border-radius: 50%;
clip-path: circle(50%);
transition: all 1s ease;
overflow: hidden;
}
.exitnew:before,
.exitnew:after {
content: "";
position: absolute;
height: 5px;
top: 22px;
left: -1px;
right: -1px;
background: green;
transform: rotate(45deg);
transition: all 1s ease;
}
.exitnew:after {
transform: rotate(-45deg);
}
.exitnew:hover {
background: transparent;
}
.exitnew:hover:before,
.exitnew:hover:after {
background: green;
}
.exitnew b {
box-sizing: border-box;
position: absolute;
left: 0;
top: 0;
width: 100%;
height: 100%;
border: 5px solid red;
border-radius: 50%;
}
<button class="exitnew" type="button" aria-label="Close"><b></b></button>
You don't need all these code. Here is an easier idea:
.exitnew {
-webkit-appearance: none;
appearance: none;
box-sizing: border-box;
margin: 0;
padding: 0;
width: 48px;
height: 48px;
cursor: pointer;
--b:7px; /* the thickness*/
--c:blue 90deg,green 0; /* the coloration */
background:
conic-gradient(from 90deg at var(--b) var(--b),var(--c))
calc(100% + var(--b)/2) calc(100% + var(--b)/2)/
calc(50% + var(--b)) calc(50% + var(--b));
border: 5px solid red;;
border-radius: 50%;
transform:rotate(45deg);
}
<button class="exitnew" type="button" aria-label="Close"></button>
You just need to use z-index property on the :after CSS selector:
.exitnew {
-webkit-appearance: none;
appearance: none;
position: relative;
box-sizing: border-box;
margin: auto;
padding: 0;
width: 48px;
height: 48px;
cursor: pointer;
background: blue;
border: none;
border-radius: 50%;
clip-path: circle(50%);
transition: all 1s ease;
overflow: hidden;
}
.exitnew:before,
.exitnew:after {
content: "";
position: absolute;
height: 5px;
top: 22px;
left: -1px;
right: -1px;
background: green;
transform: rotate(45deg);
transition: all 1s ease;
z-index: -1
}
.exitnew:after {
transform: rotate(-45deg);
}
.exitnew:hover {
background: transparent;
}
.exitnew:hover:before,
.exitnew:hover:after {
background: green;
}
.exitnew b {
box-sizing: border-box;
position: absolute;
left: 0;
top: 0;
width: 100%;
height: 100%;
border: 5px solid red;
border-radius: 50%;
}
<button class="exitnew" type="button" aria-label="Close"><b></b></button>
:before and :after are like html bread on you element sandwich. :before is the bottom slice, and :after is the top slice.
Add a negative z-index to the :before, :after styles and that will position your :after behind the button the same as the :before.
.exitnew:before,
.exitnew:after {
content: "";
position: absolute;
height: 5px;
top: 22px;
left: -1px;
right: -1px;
background: green;
transform: rotate(45deg);
transition: all 1s ease;
z-index: -1;
}
EDIT WITHOUT Z-INDEX
.exitnew {
-webkit-appearance: none;
appearance: none;
position: relative;
box-sizing: border-box;
margin: auto;
padding: 0;
width: 48px;
height: 48px;
cursor: pointer;
background: blue;
border: none;
border-radius: 50%;
clip-path: circle(50%);
transition: all 1s ease;
overflow: hidden;
}
.exitnew:before,
.exitnew:after {
content: "";
position: absolute;
height: 5px;
width: 38px;
top: 22px;
left: 5px;
right: 5px;
background: green;
transform: rotate(45deg);
transition: all 1s ease;
}
.exitnew:after {
transform: rotate(-45deg);
}
.exitnew:hover {
background: transparent;
}
.exitnew:hover:before,
.exitnew:hover:after {
background: green;
}
.exitnew b {
box-sizing: border-box;
position: absolute;
left: 0;
top: 0;
width: 100%;
height: 100%;
border: 5px solid red;
border-radius: 50%;
}
<button class="exitnew" type="button" aria-label="Close"><b></b></button>
You can set the z-index property to send the green line(s) backward, "behind" the circle:
.exitnew:before,
.exitnew:after {
content: "";
position: absolute;
height: 5px;
top: 22px;
left: -1px;
right: -1px;
background: green;
transform: rotate(45deg);
transition: all 1s ease;
z-index: -1;
}
here's an example: https://jsfiddle.net/q7zprh4w/
This is a solution without b and z-index:
.exitnew {
position: relative;
width: 48px;
height: 48px;
border: 5px solid red;
border-radius: 50%;
background-color: blue;
}
.exitnew::before {
content: "";
display: block;
position: absolute;
width: 10.416%;
height: 100%;
top: 0;
left: 44.792%;
background-color: green;
transform: rotate(45deg);
}
.exitnew::after {
content: "";
display: block;
position: absolute;
width: 10.416%;
height: 100%;
top: 0;
left: 44.792%;
background-color: green;
transform: rotate(-45deg);
}
I put the red border to the button itself. So the two pseudo element ::before and ::after aren't overlapping the red border.
Note: I don't use box-sizing: border-box

Why is that the before content doesnt contain within the button. i always have this issue designing buttons

The below code makes the before content flow outside the button itself. what should I do to contain it within the button
I need a parameter that fits the before content inside the button itself........................................................................................................................................................................
===================================================
button {
padding: 0.9em 2em;
border: 2px solid #17C3B2;
position: absolute;
background-color: transparent;
text-align: center;
text-transform: uppercase;
font-size: 16px;
color: #ddd;
transition: .3s;
display: block;
font-family: inherit;
color: #17C3B2;
z-index: 1;
}
button::before {
overflow: hidden;
content: '';
width: 0;
height: 100%;
position: absolute;
top: 50%;
left: 50%;
background: #17C3B2;
transition: .5s ease;
display: block;
z-index: ;
}
button span {
position: absolute;
left: 0;
top: 0;
width: 10%;
height: 10%;
background: transparent;
z-index: 1;
}
button span::before {
content: "";
display: block;
position: absolute;
width: 8%;
height: 500%;
background: var(--lightgray);
top: 50%;
left: 50%;
transform: translate(-50%, -50%) rotate(-60deg);
transition: all 0.3s;
}
button:hover::before {
position: absolute;
transform: translate(-50%, -50%) rotate(44deg);
width: 100%;
}
button:hover {
color: #111;
}
<button>hover me
<span></span>
</button>
i have added overflow: hidden; to the button and z-index: -1; to button:hover::before
button {
padding: 0.9em 2em;
border: 2px solid #17C3B2;
position: absolute;
background-color: transparent;
text-align: center;
text-transform: uppercase;
font-size: 16px;
color: #ddd;
transition: .3s;
display: block;
font-family: inherit;
color: #17C3B2;
z-index: 1;
overflow: hidden;
}
button::before {
overflow: hidden;
content: '';
width: 0;
height: 100%;
position: absolute;
top: 50%;
left: 50%;
background: #17C3B2;
transition: .5s ease;
display: block;
z-index: ;
}
button span {
position: absolute;
left: 0;
top: 0;
width: 10%;
height: 10%;
background: transparent;
z-index: 1;
}
button span::before {
content: "";
display: block;
position: absolute;
width: 8%;
height: 500%;
background: var(--lightgray);
top: 50%;
left: 50%;
transform: translate(-50%, -50%) rotate(-60deg);
transition: all 0.3s;
}
button:hover::before {
position: absolute;
transform: translate(-50%, -50%) rotate(44deg);
width: 100%;
z-index: -1;
}
button:hover {
color: #111;
}
<button>hover me
<span></span>
</button>

CSS Hover effect doesn't work when implemented [duplicate]

This question already has answers here:
Why do the :before and :after pseudo-elements require a 'content' property?
(5 answers)
Align inline-block DIVs to top of container element
(5 answers)
Closed 2 years ago.
i have troubleshooting with hover effects.
I'm working on a welcome webpage.
First i made an item list with HOVER effects :
body {
background-color: #E0105F;
}
.welcome-menu-box{
position: absolute;
right: 10%;
bottom: 10%;
}
.welcome-menu {
display: inline-flex;
justify-content: center;
align-items: center;
position: relative;
margin: 10px 10px;
width: 80px;
height: 80px;
background: #0D1033;
border-radius: 100px;
font-family: 'Montserrat', sans-serif;
color: #fff;
text-align: center;
font-size: 10px;
font-weight: lighter;
letter-spacing: 2px;
transition: 1s box-shadow;
}
.welcome-menu:hover {
box-shadow: 0 5px 35px 0px rgba(0,0,0,.1);
}
.welcome-menu:hover::before, .welcome-menu:hover::after {
content: '';
position: absolute;
width: 80px;
height: 80px;
background: #10E091;
border-radius: 100px;
z-index: -1;
animation: 1s clockwise infinite;
}
.welcome-menu:hover:after {
background: #EADCB5;
animation: 2s counterclockwise infinite;
}
#keyframes clockwise {
0% {
top: -5px;
left: 0;
}
12% {
top: -2px;
left: 2px;
}
25% {
top: 0;
left: 5px;
}
37% {
top: 2px;
left: 2px;
}
50% {
top: 5px;
left: 0;
}
62% {
top: 2px;
left: -2px;
}
75% {
top: 0;
left: -5px;
}
87% {
top: -2px;
left: -2px;
}
100% {
top: -5px;
left: 0;
}
}
#keyframes counterclockwise {
0% {
top: -5px;
right: 0;
}
12% {
top: -2px;
right: 2px;
}
25% {
top: 0;
right: 5px;
}
37% {
top: 2px;
right: 2px;
}
50% {
top: 5px;
right: 0;
}
62% {
top: 2px;
right: -2px;
}
75% {
top: 0;
right: -5px;
}
87% {
top: -2px;
right: -2px;
}
100% {
top: -5px;
right: 0;
}
}
<container class="welcome-menu-box">
<div class="welcome-menu">ABC</div>
<div class="welcome-menu">ABCD ABCDEF</div>
<div class="welcome-menu">ABCDEFGHIJ</div>
<div class="welcome-menu">ABCDEFGHI</div>
</container>
And I tried to implement it in a specific DIV on a webpage :
/* Div responsive encadrée pleine page avec arrière plan couleur + image png centrée et répétée depuis le centre */
.welcome-menu-box{
position: absolute;
right: 10%;
bottom: 10%;
vertical-align: middle;
}
.welcome-menu {
display: inline-flex;
justify-content: center;
text-align: center;
align-items: center;
position: relative;
margin: 10px 10px;
width: 80px;
height: 80px;
background: #0D1033;
border-radius: 100px;
font-family: 'Montserrat', sans-serif;
color: #fff;
font-size: 10px;
font-weight: lighter;
letter-spacing: 1px;
transition: 1s box-shadow;
}
.welcome-menu:hover {
box-shadow: 0 5px 35px 0px rgba(0,0,0,.1);
}
.welcome-menu:hover::before, .welcome-menu:hover::after {
position: absolute;
width: 75px;
height: 75px;
background: #10E091;
border-radius: 100px;
z-index: -1;
animation: 1s clockwise infinite;
}
.welcome-menu:hover:after {
background: #EADCB5;
animation: 2s counterclockwise infinite;
z-index: -1;
}
#keyframes clockwise {
0% {
top: -5px;
left: 0;
}
12% {
top: -2px;
left: 2px;
}
25% {
top: 0;
left: 5px;
}
37% {
top: 2px;
left: 2px;
}
50% {
top: 5px;
left: 0;
}
62% {
top: 2px;
left: -2px;
}
75% {
top: 0;
left: -5px;
}
87% {
top: -2px;
left: -2px;
}
100% {
top: -5px;
left: 0;
}
}
#keyframes counterclockwise {
0% {
top: -5px;
right: 0;
}
12% {
top: -2px;
right: 2px;
}
25% {
top: 0;
right: 5px;
}
37% {
top: 2px;
right: 2px;
}
50% {
top: 5px;
right: 0;
}
62% {
top: 2px;
right: -2px;
}
75% {
top: 0;
right: -5px;
}
87% {
top: -2px;
right: -2px;
}
100% {
top: -5px;
right: 0;
}
}
.encadrement {
background: url('https://www.agence-mibe.com/CODEPEN/GROSMYO-fullresponsive.png') repeat center center fixed, #E0105F;
position: absolute;
top: 0;
left: 0;
border: 75px solid #fff;
width: 100%;
height: 100%;
box-sizing: border-box;
background-size: auto 70%;
}
#media screen and (max-width: 1200px) {
.encadrement {
border: 50px solid #fff;
}
#media screen and (max-width: 768px) {
.encadrement {
border: 25px solid #fff;
background-size: 70% auto;
}
<section class="encadrement">
<container class="welcome-menu-box">
<div class="welcome-menu">ABC</div>
<div class="welcome-menu">ABCD ABCDEFG</div>
<div class="welcome-menu">ABCDEFGHIJ</div>
<div class="welcome-menu">ABCDEFG</div>
</container>
</section>
I have two problems that I'm not able to solve :
• The second item which contains two world has a vertical misalignment due to the occupied space
• The hover effect doesn't work on the web page, but works when alone
If somebody could give me a hint it would be wonderful :-)

Ribbon shape button with icons and line on hover

I m trying to design a both and ribbon shape button on hover should show horizontal line and icon on both ends.
https://imgur.com/a/iYvJUzJ
.right-left-flag {
position: relative;
background: black;
padding: 22.1px 40px;
color: #fff;
text-transform: uppercase;
}
.right-left-flag:before,
.right-left-flag:after {
border-color: #000 transparent;
top: 0;
}
.right-left-flag:before,
.right-left-flag:after {
border-style: solid;
height: 0;
width: 0;
display: block;
content: "";
position: absolute;
}
.right-left-flag:before {
left: -19.5px;
border-width: 33px 0 28.5px 20px;
}
.right-left-flag:after {
right: -19.5px;
border-width: 33px 20px 28.5px 0;
}
Read More
Hope this will help you get some idea about how to do.
You can add any font icon to the after and before elements of the span inside the content.
.right-left-flag {
position: relative;
background: black;
padding: 22px 40px;
color: #fff;
text-transform: uppercase;
top: 30px;
left: 30px;
display: inline-flex;
}
.right-left-flag:before,
.right-left-flag:after {
border-color: #000 transparent;
top: 0;
}
.right-left-flag:before,
.right-left-flag:after {
border-style: solid;
height: 0;
width: 0;
display: block;
content: "";
position: absolute;
}
.right-left-flag:before {
left: -19.5px;
border-width: 33px 0 28.5px 20px;
}
.right-left-flag:after {
right: -19.5px;
border-width: 33px 20px 28.5px 0;
}
.right-left-flag:hover>span {
opacity: 1
}
.right-left-flag>span {
opacity: 0;
position: absolute;
left: 5px;
right: 5px;
top: 50%;
transform: translateY(-50%);
height: 1px;
background: #fff;
transition: all .2s;
}
.right-left-flag>span:before {
content: ':)';
position: absolute;
left: 0;
top: 50%;
transform: translateY(-50%);
}
.right-left-flag>span:after {
content: ':)';
position: absolute;
left: auto;
right: 0;
top: 50%;
transform: translateY(-50%);
}
Read More<span></span>

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.

Resources