User:Pax/secret.css: Difference between revisions
< User:Pax
(Created page with "@import url('https://fonts.googleapis.com/css?family=Raleway:200'); body { font-family: 'Raleway', sans-serif; background:#eee; } .wrapper { position: absolute; top:...") |
No edit summary |
||
(36 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
.container { | .container { | ||
position: | position: relative; | ||
display: inline-block; | |||
border-radius: 2em 2em 2em 2em; | |||
} | } | ||
.container2 { | |||
position: | position: relative; | ||
display: inline-block; | |||
border-radius: 2em 2em 2em 2em; | |||
} | } | ||
.image { | .image { | ||
display: block; | |||
width: 100%; | width: 100%; | ||
height: | height: auto; | ||
border-radius: 2em 2em 2em 2em; | |||
} | } | ||
.overlay { | |||
position: absolute; | position: absolute; | ||
border-radius: 2em 2em 2em 2em; | |||
top: 0; | |||
border-radius: | bottom: 0; | ||
left: 0; | |||
right: 0; | |||
height: 100%; | |||
height: | |||
width: 100%; | width: 100%; | ||
opacity: 1; | opacity: 1; | ||
transition: .5s ease; | |||
background-color: #140E0A; | |||
} | } | ||
. | .overlay2 { | ||
position: absolute; | position: absolute; | ||
top: | border-radius: 2em 2em 2em 2em; | ||
left: 0 | top: 0; | ||
height: | bottom: 0; | ||
left: 0; | |||
right: 0; | |||
height: 100%; | |||
width: 100%; | width: 100%; | ||
opacity: 0; | |||
transition: .5s ease; | |||
background-color: #140E0A; | |||
} | } | ||
.container:hover .overlay { | |||
opacity: 0; | |||
border-radius:2em 2em 2em 2em; | |||
} | } | ||
.container2:hover .overlay2 { | |||
opacity: 1; | |||
border-radius:2em 2em 2em 2em; | |||
} | } | ||
. | .text { | ||
color: white; | |||
font-size: 12pt; | |||
position: absolute; | position: absolute; | ||
font-family: Josefin Sans; | |||
top: 50%; | |||
left: 50%; | |||
-webkit-transform: translate(-50%, -50%); | |||
-ms-transform: translate(-50%, -50%); | |||
transform: translate(-50%, -50%); | |||
top: | |||
left: | |||
text-align: center; | text-align: center; | ||
} | } |
Latest revision as of 09:15, 18 January 2021
.container { position: relative; display: inline-block; border-radius: 2em 2em 2em 2em; } .container2 { position: relative; display: inline-block; border-radius: 2em 2em 2em 2em; } .image { display: block; width: 100%; height: auto; border-radius: 2em 2em 2em 2em; } .overlay { position: absolute; border-radius: 2em 2em 2em 2em; top: 0; bottom: 0; left: 0; right: 0; height: 100%; width: 100%; opacity: 1; transition: .5s ease; background-color: #140E0A; } .overlay2 { position: absolute; border-radius: 2em 2em 2em 2em; top: 0; bottom: 0; left: 0; right: 0; height: 100%; width: 100%; opacity: 0; transition: .5s ease; background-color: #140E0A; } .container:hover .overlay { opacity: 0; border-radius:2em 2em 2em 2em; } .container2:hover .overlay2 { opacity: 1; border-radius:2em 2em 2em 2em; } .text { color: white; font-size: 12pt; position: absolute; font-family: Josefin Sans; top: 50%; left: 50%; -webkit-transform: translate(-50%, -50%); -ms-transform: translate(-50%, -50%); transform: translate(-50%, -50%); text-align: center; }