I have the following HTML:
<div class="item">
<img src="images/gallery/woman-1.jpg" alt="" width="100%" >
<div class="content">
<h3>A blog title.</h3>
</div><!-- /.content -->
</div>
Along with the following CSS:
.gallery {
.item {
width: 33%;
height: auto;
float: left;
}
}
I'd like to get this "Creative Zoe" effect on the items from here:
http://tympanus.net/Development/HoverEffectIdeas/
I've downloaded the source and tried to apply on the items but when I do, nothing works. I'm not sure what I'm doing wrong. Here is my attempt:
https://dl.dropboxusercontent.com/u/54191672/theme/index.html
I'm pretty stumped and would REALLY like this effect on my project. How can I do this correctly?
figure.effect-zoe figcaption {
top: auto;
bottom: 0;
padding: 1em;
height: 3.75em;
background: #fff;
color: #3c4a50;
-webkit-transition: -webkit-transform 0.35s;
transition: transform 0.35s;
-webkit-transform: translate3d(0, 100%, 0);
transform: translate3d(0, 100%, 0);
}
figure.effect-zoe h2 {
float: left;
}
figure.effect-zoe figcaption > span {
float: right;
}
figure.effect-zoe p {
position: absolute;
bottom: 8em;
padding: 2em;
color: #fff;
text-transform: none;
font-size: 90%;
opacity: 0;
-webkit-backface-visibility: hidden;
backface-visibility: hidden;
-webkit-transition: opacity 0.35s;
transition: opacity 0.35s;
}
figure.effect-zoe h2,
figure.effect-zoe figcaption > span {
-webkit-transition: -webkit-transform 0.35s;
transition: transform 0.35s;
-webkit-transform: translate3d(0, 200%, 0);
transform: translate3d(0, 200%, 0);
}
figure.effect-zoe figcaption > span::before {
display: inline-block;
padding: 8px 10px;
font-family: 'feathericons';
speak: none;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
.icon-eye::before {
content: '\e000';
}
.icon-paper-clip::before {
content: '\e001';
}
.icon-heart::before {
content: '\e024';
}
figure.effect-zoe h2 {
display: inline-block;
}
figure.effect-zoe:hover p {
opacity: 1;
}
figure.effect-zoe:hover figcaption,
figure.effect-zoe:hover h2,
figure.effect-zoe:hover figcaption > span {
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}
figure.effect-zoe:hover h2 {
-webkit-transition-delay: 0.05s;
transition-delay: 0.05s;
}
figure.effect-zoe:hover figcaption > span:nth-child(4) {
-webkit-transition-delay: 0.1s;
transition-delay: 0.1s;
}
figure.effect-zoe:hover figcaption > span:nth-child(3) {
-webkit-transition-delay: 0.15s;
transition-delay: 0.15s;
}
figure.effect-zoe:hover figcaption > span:nth-child(2) {
-webkit-transition-delay: 0.2s;
transition-delay: 0.2s;
}
<figure class="effect-zoe">
<img src="img/14.jpg" alt="img14">
<figcaption>
<h2>Creative <span>Zoe</span></h2>
<span class="icon-heart"></span>
<span class="icon-eye"></span>
<span class="icon-paper-clip"></span>
<p>Zoe never had the patience of her sisters. She deliberately punched the bear in his face.</p>
View more
</figcaption>
</figure>
It looks like you're missing the classes on your html that they use to trigger the effects.
<figure class="effect-zoe">
<img src="img/14.jpg" alt="img14">
<figcaption>
<h2>Creative <span>Zoe</span></h2>
<span class="icon-heart"></span>
<span class="icon-eye"></span>
<span class="icon-paper-clip"></span>
<p>Zoe never had the patience of her sisters. She deliberately punched the bear in his face.</p>
View more
</figcaption>
</figure>
They also have a lot of CSS on it that you dont seem to have
/*---------------*/
/***** Zoe *****/
/*---------------*/
figure.effect-zoe figcaption {
top: auto;
bottom: 0;
padding: 1em;
height: 3.75em;
background: #fff;
color: #3c4a50;
-webkit-transition: -webkit-transform 0.35s;
transition: transform 0.35s;
-webkit-transform: translate3d(0,100%,0);
transform: translate3d(0,100%,0);
}
figure.effect-zoe h2 {
float: left;
}
figure.effect-zoe figcaption > span {
float: right;
}
figure.effect-zoe p {
position: absolute;
bottom: 8em;
padding: 2em;
color: #fff;
text-transform: none;
font-size: 90%;
opacity: 0;
-webkit-backface-visibility: hidden;
backface-visibility: hidden;
-webkit-transition: opacity 0.35s;
transition: opacity 0.35s;
}
figure.effect-zoe h2,
figure.effect-zoe figcaption > span {
-webkit-transition: -webkit-transform 0.35s;
transition: transform 0.35s;
-webkit-transform: translate3d(0,200%,0);
transform: translate3d(0,200%,0);
}
figure.effect-zoe figcaption > span::before {
display: inline-block;
padding: 8px 10px;
font-family: 'feathericons';
speak: none;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
.icon-eye::before {
content: '\e000';
}
.icon-paper-clip::before {
content: '\e001';
}
.icon-heart::before {
content: '\e024';
}
figure.effect-zoe h2 {
display: inline-block;
}
figure.effect-zoe:hover p {
opacity: 1;
}
figure.effect-zoe:hover figcaption,
figure.effect-zoe:hover h2,
figure.effect-zoe:hover figcaption > span {
-webkit-transform: translate3d(0,0,0);
transform: translate3d(0,0,0);
}
figure.effect-zoe:hover h2 {
-webkit-transition-delay: 0.05s;
transition-delay: 0.05s;
}
figure.effect-zoe:hover figcaption > span:nth-child(4) {
-webkit-transition-delay: 0.1s;
transition-delay: 0.1s;
}
figure.effect-zoe:hover figcaption > span:nth-child(3) {
-webkit-transition-delay: 0.15s;
transition-delay: 0.15s;
}
figure.effect-zoe:hover figcaption > span:nth-child(2) {
-webkit-transition-delay: 0.2s;
transition-delay: 0.2s;
}
Related
How can I make the "Menu" Button remain in hover as long as the mouse/pointer remains in the menu? When the pointer points on Twitter for example I want the menu button to show Home.
Like this:
And not like this:
This is the Codepen example: https://codepen.io/fotios_tragopoulos/pen/YzWyZJj
This is the code:
body {
background-color: #010101;
color: rgba(255, 255, 255, 0.7);
font-family: 'Lato', sans-serif;
margin: 20px;
}
.menu {
text-transform: uppercase;
color: rgba(255, 255, 255, 0.8);
display: inline-block;
cursor: pointer;
pointer-events: none;
position: absolute;
bottom: 20px;
left: 20px;
&:hover {
pointer-events: all;
.spacer {
&:before {
width: 100%;
transition-delay: 0s;
}
}
.item {
opacity: 1;
top: 0px;
&:nth-child(1) {
transition-delay: 0.25s;
}
&:nth-child(2) {
transition-delay: 0.3s;
}
&:nth-child(3) {
transition-delay: 0.35s;
}
&:nth-child(4) {
transition-delay: 0.4s;
}
&:nth-child(5) {
transition-delay: 0.45s;
}
&:nth-child(6) {
transition-delay: 0.5s;
}
&:nth-child(7) {
transition-delay: 0.55s;
}
&:nth-child(8) {
transition-delay: 0.6s;
}
&:nth-child(9) {
transition-delay: 0.65s;
}
&:nth-child(10) {
transition-delay: 0.7s;
}
}
}
}
.label {
display: inline-block;
cursor: pointer;
pointer-events: all;
}
.spacer {
display: inline-block;
width: 80px;
margin-left: 15px;
margin-right: 15px;
vertical-align: middle;
cursor: pointer;
position: relative;
&:before {
content: "";
position: absolute;
border-bottom: 1px solid #ffffff;
height: 1px;
width: 0%;
transition: width 0.25s ease;
transition-delay: 0.7s;
}
}
.item {
position: relative;
display: inline-block;
margin-right: 30px;
top: 10px;
opacity: 0;
transition: opacity 0.5s ease, top 0.5s ease;
transition-delay: 0;
&:hover {
span {
color: #ff0000;
}
}
&:nth-child(1) {
transition-delay: 0.45s;
}
&:nth-child(2) {
transition-delay: 0.4s;
}
&:nth-child(3) {
transition-delay: 0.35s;
}
&:nth-child(4) {
transition-delay: 0.3s;
}
&:nth-child(5) {
transition-delay: 0.25s;
}
&:nth-child(6) {
transition-delay: 0.2s;
}
&:nth-child(7) {
transition-delay: 0.15s;
}
&:nth-child(8) {
transition-delay: 0.1s;
}
&:nth-child(9) {
transition-delay: 0.05s;
}
&:nth-child(10) {
transition-delay: 0s;
}
}
span {
transition: color 0.5s ease;
}
.btn-flip {
opacity: 1;
outline: 0;
color: #fff;
line-height: 40px;
position: relative;
text-align: center;
letter-spacing: 1px;
display: inline-block;
text-decoration: none;
font-family: 'Open Sans';
text-transform: uppercase;
&:hover {
&:after {
opacity: 1;
transform: translateY(0) rotateX(0);
}
&:before {
opacity: 0;
transform: translateY(50%) rotateX(90deg);
}
}
&:after {
top: 0;
left: 0;
opacity: 0;
width: 100%;
color: #323237;
display: block;
transition: 0.5s;
position: absolute;
background: #adadaf;
content: attr(data-back);
transform: translateY(-50%) rotateX(90deg);
}
&:before {
top: 0;
left: 0;
opacity: 1;
color: #adadaf;
display: block;
padding: 0 30px;
line-height: 40px;
transition: 0.5s;
position: relative;
background: #323237;
content: attr(data-front);
transform: translateY(0) rotateX(0);
}
}
<div class="menu">
<div class="spacer"></div>
<div class="item"><span>Twitter</span></div>
<div class="item"><span>Instagram</span></div>
<div class="item"><span>Flickr</span></div>
<div class="item"><span>Behance</span></div>
<div class="item"><span>MixCloud</span></div>
</div>
You can add the same rules inside .menu:
.menu {
...
&:hover {
.btn-flip {
&:after {
opacity: 1;
transform: translateY(0) rotateX(0);
}
&:before {
opacity: 0;
transform: translateY(50%) rotateX(90deg);
}
}
I would like to achieve the following effect: below CSS, on hover, does a "slot machine effect" that rolls the icon in a vertical carousel (please see the css below for details).
Due to restrictions of hosting that I am using for my website, I cannot use any external library of icons, so I would like to achieve the same effect, pasting the css into the header and using it with an img tag in HTML.
Could you please help me trim this css so that it will actually work with my image?
Thank you for all your forbearance and help.
-webkit-transition:all .3s;
-o-transition:all .3s;
transition:all .3s
}
.btn.social_share:hover .social-media-share-buttons-icon:before {
top: 40px;
-webkit-transition: all .3s;
-o-transition: all .3s;
transition: all .3s
}
.btn.social_share:hover .social-media-share-buttons-icon:after {
top: 0;
-webkit-transition: all .3s;
-o-transition: all .3s;
transition: all .3s
}
.btn.social_share:active {
text-decoration: none!important;
-webkit-touch-callout: none
}
.btn.social_share:active .social-media-share-buttons-icon {
background-color: rgba(0, 0, 0, .2);
-webkit-transition: all .3s;
-o-transition: all .3s;
transition: all .3s
}
.btn.social_share:active .social-media-share-buttons-icon:before {
top: 40px;
-webkit-transition: all .3s;
-o-transition: all .3s;
transition: all .3s
}
.btn.social_share:active .social-media-share-buttons-icon:after {
top: 0;
-webkit-transition: all .3s;
-o-transition: all .3s;
transition: all .3s
}
.btn.social_share.facebook .social-media-share-buttons-icon:after,
.btn.social_share.facebook .social-media-share-buttons-icon:before {
content: "\e63f"
}
.btn.social_share.linkedin .social-media-share-buttons-icon:after,
.btn.social_share.linkedin .social-media-share-buttons-icon:before {
content: "\e631"
}
.btn.social_share.twitter .social-media-share-buttons-icon:after,
.btn.social_share.twitter .social-media-share-buttons-icon:before {
content: "\e640"
}
#-moz-keyframes fadeBottom {
0% {
opacity: 0;
-ms-transform: translateY(10%);
-webkit-transform: translateY(10%);
transform: translateY(10%)
}
100% {
opacity: 1;
-ms-transform: translateY(0);
-webkit-transform: translateY(0);
transform: translateY(0)
}
}
#-webkit-keyframes fadeBottom {
0% {
opacity: 0;
-ms-transform: translateY(10%);
-webkit-transform: translateY(10%);
transform: translateY(10%)
}
100% {
opacity: 1;
-ms-transform: translateY(0);
-webkit-transform: translateY(0);
transform: translateY(0)
}
}
#-o-keyframes fadeBottom {
0% {
opacity: 0;
-ms-transform: translateY(10%);
-webkit-transform: translateY(10%);
transform: translateY(10%)
}
100% {
opacity: 1;
-ms-transform: translateY(0);
-webkit-transform: translateY(0);
transform: translateY(0)
}
}
As requested, also adding the HTML snippet, which currently is not working with above css:
<div style="padding: 30px 0; padding-left: 0px; margin-left: 0px; margin-right: 0px; text-align: center">
<div class="col-xs-12">
<ul class="social-media-share-buttons">
<li>
<a target="_blank" href="https://www.facebook.com/sharer/sharer.php?u=https://www.mywebsite.com" class="btn btn-link social_share facebook" rel="nofollow" data-social_name="facebook" data-post_id="" data-social_type="share" data-location="inline">
<img class="social-media-share-buttons-icon" src="facebook_icon.png">
<div style="color: #fff; line-height: 2; font-weight: 700;">Facebook</div>
</a>
</li>
You don't need animations for that. Just use transitions and transforms and it works: Here some example:
ul {
text-align: center;
padding: 0;
}
li {
list-style-type: none;
}
a {
display: inline-block;
position: relative;
height: 40px;
background: #4456aa;
line-height: 40px;
overflow: hidden;
color: white;
text-decoration: none;
font-family: sans-serif;
border: 1px solid transparent;
transition: all 0.5s ease 0.5s;
}
a div {
padding: 0 30px;
}
a img {
transition: all ease 1s;
position: absolute;
top: 100%;
left: 0;
bottom: 0;
width: 30px;
margin: auto;
opacity: 0;
}
a:hover {
transition: all ease 0.5s;
}
a:hover {
background: #ffffff;
border: 1px solid #000000;
color: #000000;
}
a:hover img {
transition: all 0.5s ease 0.5s;
opacity: 1;
top: 0;
bottom: 0;
}
<ul class="social-media-share-buttons">
<li>
<a target="_blank"
href="https://www.facebook.com/sharer/sharer.php?u=https://www.mywebsite.com"
class="btn btn-link social_share facebook"
rel="nofollow"
data-social_name="facebook"
data-post_id=""
data-social_type="share"
data-location="inline">
<img class="social-media-share-buttons-icon"
src="https://image.flaticon.com/icons/png/128/20/20837.png">
<div>Facebook</div>
</a>
</li>
</ul>
You may use pre-built CSS properties like transforms and transitions, maybe they make you independent of animations.
I am probably not the first person in the world to have a mouse-over scroll up text animation, however, at the same time, for whatever reason, I have found next to none in terms of analogs to compare with. My particular set up uses <figure> wrapped over <figcaption> wrapped over sibling <p>'s.
The issue I'm having with my CSS is my <p>'s are not centered very well vertically after the animation completes.. That is to say, depending on how long the text inside <p> there will either be too much space above or below the list of <p>'s. Have a look at my snippet. I want the space within the figure (inside the black border) to be equal at the top and bottom, but it's not:
figure img {
width: 300px;
height: 300px;
}
figure {
border: 2px solid black;
margin-bottom: 0;
margin-top: -2px;
margin-right: -40px;
position: relative;
z-index: 1;
display: inline-block;
overflow: hidden;
text-align: center;
}
figure figcaption {
padding: 2em;
-webkit-backface-visibility: hidden;
backface-visibility: hidden;
}
figure figcaption::before,
figure figcaption::after {
pointer-events: none;
}
figure figcaption {
position: absolute;
top: 0px;
left: 0;
width: 100%;
height: 100%;
}
figure p {
font-family: Play;
font-size: 20px;
height: auto;
overflow: hidden;
position: relative;
opacity: 0;
bottom: -110%;
}
figure:hover h2 {
opacity: 0;
-webkit-transition: opacity 0.95s, -webkit-transform 0.95s;
transition: opacity 0.95s, transform 0.95s;
}
figcaption:hover p:nth-of-type(1) {
transition: 1s;
bottom: 60%;
opacity: 1;
}
figcaption:hover p:nth-of-type(2) {
bottom: 60%;
opacity: 1;
transition: 1s;
transition-delay: .3s;
}
figcaption:hover p:nth-of-type(3) {
bottom: 60%;
opacity: 1;
transition: 1s;
transition-delay: .6s;
}
figure:hover .border-rect {
opacity: 0;
-webkit-transition: opacity 0.5s;
transition: opacity 0.5s;
}
figure.effect img {
-webkit-transition: opacity 0.35s;
transition: opacity 0.35s;
}
figure.effect:hover img {
opacity: 0.4;
}
figure.effect figcaption::before,
figure.effect figcaption::after {
position: absolute;
top: 30px;
right: 30px;
bottom: 30px;
left: 30px;
content: '';
opacity: 0;
-webkit-transition: opacity 0.35s, -webkit-transform 0.35s;
transition: opacity 0.35s, transform 0.35s;
}
figure.effect figcaption::before {
border-top: 1px solid #fff;
border-bottom: 1px solid #fff;
-webkit-transform: scale(0, 1);
transform: scale(0, 1);
}
figure.effect figcaption::after {
border-right: 1px solid #fff;
border-left: 1px solid #fff;
-webkit-transform: scale(1, 0);
transform: scale(1, 0);
}
figure.effect h2 {
opacity: 1;
-webkit-transition: opacity 0.95s, -webkit-transform 0.95s;
transition: opacity 0.95s, transform 0.95s;
-webkit-transition: -webkit-transform 0.35s;
transition: transform 0.35s;
-webkit-transform: translate3d(0, -20px, 0);
transform: translate3d(0, -20px, 0);
padding-top: 30%;
}
figure.effect:hover figcaption::before,
figure.effect:hover figcaption::after {
opacity: 1;
-webkit-transform: scale(1);
transform: scale(1);
}
figure:hover h2 {
opacity: 0;
-webkit-transition: opacity 0.5s;
transition: opacity 0.5s;
}
<figure class="effect">
<img src="http://en.wikipedia.org/wiki/Mountain#/media/File:Lewis_overthrust_fault_nh10f.jpg" />
<figcaption>
<h2>Hover Somewhere Around Here</h2>
<p>paragraph paragraph paragraph </p>
<p>paragraph paragraph paragraph paragraph paragraph</p>
<p>paragraph paragraph paragraph paragraph paragraph</p>
View more
</figcaption>
</figure>
Question: How do I have my <p> scroll robust to different lengths of text the <p> could have? Equivalently, how do I ensure my <p>'s scroll up and land centered vertically within the figure (the black border in the snippet)?
You've done a pretty decent job of this, can I just say first.
Regarding the centering issue, there's 32px padding on each side, so if you give the paragraph a max-width of 236 (300 -64) then the paragraphs will center fine. I set it to 235 in the snippet but add the extra pixel if you want.. :)
The different lengths question.. hmm. It caters for paragraphs of different widths. If you want to cater paragraphs for indeterminable/varied lengths, the image that you're using to create the outline will impede the potential visibility of a scrollbar if you added overflow. If I were to make a scroll-able box, I'd have probably started with a bordered div instead of a figure .. this may be an alternative route for you to take? Just a suggestion.
figure img {
width: 300px;
height: 300px;
}
figure h2 {
max-width: 235px;
}
figure {
border: 2px solid black;
margin-bottom: 0;
margin-top: -2px;
margin-right: -40px;
position: relative;
z-index: 1;
display: inline-block;
overflow: hidden;
text-align: center;
}
figure figcaption {
padding: 2em;
-webkit-backface-visibility: hidden;
backface-visibility: hidden;
}
figure figcaption::before,
figure figcaption::after {
pointer-events: none;
}
figure figcaption {
position: absolute;
top: 0px;
left: 0;
width: 100%;
height: 100%;
}
figure p {
font-family: Play;
font-size: 20px;
max-width: 235px;
height: auto;
overflow: hidden;
position: relative;
opacity: 0;
bottom: -110%;
}
figure:hover h2 {
opacity: 0;
-webkit-transition: opacity 0.95s, -webkit-transform 0.95s;
transition: opacity 0.95s, transform 0.95s;
}
figcaption:hover p:nth-of-type(1) {
transition: 1s;
bottom: 70%;
opacity: 1;
}
figcaption:hover p:nth-of-type(2) {
bottom: 70%;
opacity: 1;
transition: 1s;
transition-delay: .3s;
}
figcaption:hover p:nth-of-type(3) {
bottom: 70%;
opacity: 1;
transition: 1s;
transition-delay: .6s;
}
figure:hover .border-rect {
opacity: 0;
-webkit-transition: opacity 0.5s;
transition: opacity 0.5s;
}
figure.effect img {
-webkit-transition: opacity 0.35s;
transition: opacity 0.35s;
}
figure.effect:hover img {
opacity: 0.4;
}
figure.effect figcaption::before,
figure.effect figcaption::after {
position: absolute;
top: 30px;
right: 30px;
bottom: 30px;
left: 30px;
content: '';
opacity: 0;
-webkit-transition: opacity 0.35s, -webkit-transform 0.35s;
transition: opacity 0.35s, transform 0.35s;
}
figure.effect figcaption::before {
border-top: 1px solid #fff;
border-bottom: 1px solid #fff;
-webkit-transform: scale(0, 1);
transform: scale(0, 1);
}
figure.effect figcaption::after {
border-right: 1px solid #fff;
border-left: 1px solid #fff;
-webkit-transform: scale(1, 0);
transform: scale(1, 0);
}
figure.effect h2 {
opacity: 1;
-webkit-transition: opacity 0.95s, -webkit-transform 0.95s;
transition: opacity 0.95s, transform 0.95s;
-webkit-transition: -webkit-transform 0.35s;
transition: transform 0.35s;
-webkit-transform: translate3d(0, -20px, 0);
transform: translate3d(0, -20px, 0);
padding-top: 30%;
max-width:235px;
}
figure.effect:hover figcaption::before,
figure.effect:hover figcaption::after {
opacity: 1;
-webkit-transform: scale(1);
transform: scale(1);
}
figure:hover h2 {
opacity: 0;
-webkit-transition: opacity 0.5s;
transition: opacity 0.5s;
}
<figure class="effect">
<img src="http://en.wikipedia.org/wiki/Mountain#/media/File:Lewis_overthrust_fault_nh10f.jpg" />
<figcaption>
<h2>Hover Somewhere Around Here
</h2>
<p>paragraph paragraph paragraph paragraph paragraph paragraph </p>
<p>You hovered on me! Great!</p>
<p>paragraph paragraph paragraph paragraph paragraph paragraph paragraph paragraph paragraph paragraph</p>
View more
</figcaption>
</figure>
I have a problem with some image in safari. It is working everywhere but not in safari. I've some images on my site but on safari the image's are going way to high.
The website is development.mar-bakker.nl
<div class="col-xs-12 col-sm-4 col-md-4">
<div class="grid wow zoomIn">
<figure class="effect-bubba">
<img src="assets/images/item-2.jpg" class="img-responsive" alt="img01"/>
<figcaption>
<h2>Webshop <span>PC4U</span></h2>
<p>Lily likes to play with crayons and pencils</p>
</figcaption>
</figure>
</div>
</div>
And the css is this:
figure.effect-bubba {
background: #9e5406;
}
figure.effect-bubba img {
opacity: 0.7;
-webkit-transition: opacity 0.35s;
transition: opacity 0.35s;
}
figure.effect-bubba:hover img {
opacity: 0.4;
}
figure.effect-bubba figcaption::before,
figure.effect-bubba figcaption::after {
position: absolute;
top: 30px;
right: 30px;
bottom: 30px;
left: 30px;
content: '';
opacity: 0;
-webkit-transition: opacity 0.35s, -webkit-transform 0.35s;
transition: opacity 0.35s, transform 0.35s;
}
figure.effect-bubba figcaption::before {
border-top: 1px solid #fff;
border-bottom: 1px solid #fff;
-webkit-transform: scale(0,1);
transform: scale(0,1);
}
figure.effect-bubba figcaption::after {
border-right: 1px solid #fff;
border-left: 1px solid #fff;
-webkit-transform: scale(1,0);
transform: scale(1,0);
}
figure.effect-bubba h2 {
padding-top: 10%;
-webkit-transition: -webkit-transform 0.35s;
transition: transform 0.35s;
-webkit-transform: translate3d(0,-20px,0);
transform: translate3d(0,-20px,0);
color: #fff;
}
figure.effect-bubba p {
padding: 20px 2.5em;
opacity: 0;
-webkit-transition: opacity 0.35s, -webkit-transform 0.35s;
transition: opacity 0.35s, transform 0.35s;
-webkit-transform: translate3d(0,20px,0);
transform: translate3d(0,20px,0);
}
figure.effect-bubba:hover figcaption::before,
figure.effect-bubba:hover figcaption::after {
opacity: 1;
-webkit-transform: scale(1);
transform: scale(1);
}
figure.effect-bubba:hover h2,
figure.effect-bubba:hover p {
opacity: 1;
-webkit-transform: translate3d(0,0,0);
transform: translate3d(0,0,0);
}
Can someone help me.
i found the error! it was by a diffent css element
.grid figure figcaption, .grid figure figcaption > a {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
}
Try to remove the max-width and min-height definitions in the .grid figure img selector
.grid figure img {
position: relative;
display: block;
/* min-height: 100%; */
/* max-width: 100%; */
opacity: 0.8;
}
I am encountering this strange bug. But only in Chrome so far. Firefox and IE11 are doing fine.
The problem is this:
When I hover over an image in my portfolio, the opacity drops from 0.7 to 0.2. When the transition is done, a strange line appears that looks like it isnt affected by the opacity attribute.
System specs:
Windows 7 Home Premium Service Pack 1 // Chrome 38.0.2125.111 m
Screen resolution: 1920 x 1080
Video card: nVidea GeForce GT650m
Here is a link to a demo site.
Here you can see the line in a screenshot:
And here is a working code snippet:
.grid figure {
position: relative;
display: inline-block;
overflow: hidden;
margin: -0.135em;
width: 33.333%;
text-align: center;
cursor: pointer;
}
.grid figure img {
position: relative;
display: block;
opacity: 0.8;
}
.grid figure figcaption {
padding: 2em;
color: #fff;
text-transform: uppercase;
font-size: 1.25em;
-webkit-backface-visibility: hidden;
backface-visibility: hidden;
}
.grid figure figcaption::before,
.grid figure figcaption::after {
pointer-events: none;
}
.grid figure figcaption,
.grid figure a {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
}
.grid figure a {
z-index: 1000;
text-indent: 200%;
white-space: nowrap;
font-size: 0;
opacity: 0;
}
.grid figure h2 {
word-spacing: -0.15em;
font-weight: 700;
}
.grid figure h2 span {
font-weight: 300;
margin-right: 5px;
float: left;
margin-top: -1px;
font-size: 31px;
}
.grid figure h2,
.grid figure p {
margin: 0;
}
.grid figure p {
letter-spacing: 1px;
font-size: 68.5%;
clear: left;
}
figure.effect-lily img {
width: calc(100% + 50px);
opacity: 0.7;
-webkit-transition: opacity 0.35s, -webkit-transform 0.35s;
transition: opacity 0.35s, transform 0.35s;
-webkit-transform: translate3d(-40px, 0, 0);
transform: translate3d(-40px, 0, 0);
}
figure.effect-lily figcaption {
top: auto;
bottom: 0;
height: 50%;
text-align: left;
padding: 10%;
}
figure.effect-lily h2,
figure.effect-lily p {
-webkit-transform: translate3d(0, 40px, 0);
transform: translate3d(0, 40px, 0);
}
figure.effect-lily h2 {
-webkit-transition: -webkit-transform 0.35s;
transition: transform 0.35s;
}
figure.effect-lily p {
color: #fff;
opacity: 0;
-webkit-transition: opacity 0.2s, -webkit-transform 0.35s;
transition: opacity 0.2s, transform 0.35s;
font-size: 18px;
font-weight: 300;
text-transform: capitalize;
}
figure.effect-lily:hover img {
opacity: 0.2;
}
figure.effect-lily:hover p {
opacity: 0.5;
}
figure.effect-lily:hover img,
figure.effect-lily:hover h2,
figure.effect-lily:hover p {
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}
figure.effect-lily:hover p {
-webkit-transition-delay: 0.05s;
transition-delay: 0.05s;
-webkit-transition-duration: 0.35s;
transition-duration: 0.35s;
}
figure.effect-lily p.cursive {
font-weight: 700;
}
<figure class="effect-lily double">
<img src="http://www.baasdesign.nl/projects/Bootstrap/images/5.jpg" alt="img01" />
<figcaption>
<h2><span>Stichting</span>Werkartaal</h2>
<p>Meer in reïntegratie</p>
</figcaption>
View more
</figure>
Any one ANY clue to what this could be?