Text blurry after super simple CSS3 Transform animation - html

As simple as it is, I can't get this animation to work properly.
What I am animating on hovering a div is:
transform3d(0, Xem, 0)
border
height
so, nothing special. But when I open this in Chrome, I'm getting a really poorly performing hover animation.
And the worst thing is that the transform 3d makes my text blurry. WHY? There is no zoom or any 3D effect.
Have a look in your browser: Click
Am I missing something? This seems like a quite simple animation.
div before hover
div hovered (blurry text)
The CSS Code (SASS) is basically:
.disciplines-wrapper > div {
color: white;
padding: 0;
width: 33%;
margin-right: .5%;
margin-top: 320px;
height: 12em;
height: 8.375em;
cursor: pointer;
position: relative;
.wrap {
height: 8.375em;
position: absolute;
transition: transform 0.2s ease-out, height 0.2s ease-out, border 0.2s ease-out;
border: 1px solid white;
overflow: hidden;
backface-visibility: hidden;
&:hover {
transform: translate3d(0, -3.475em, 0);
height: 11.875em;
border: 1px solid $lightblue;
background: $lightblue;
}
}
}
The HTML
<div class="disciplines-wrapper">
<div class="col-1-3">
<div class="wrap">
<div class="disciplines-text-wrapper">
<h1>
Kreation
</h1>
<p>Effektive Werbung entsteht durch das optimale Zusammenspiel aller Kreativen. </p>
</div>
<i class="icon-right-circled"></i>Weitere Informationen
</div>
</div>
<div class="col-1-3">
<div class="wrap">
<div class="disciplines-text-wrapper">
<h1>
Druck
</h1>
<p>Kernkompetenz von Prinovis ist der Druck. Schnell, hochwertig und flexibel.</p>
</div>
<i class="icon-right-circled"></i>Weitere Informationen
</div>
</div>
<div class="col-1-3">
<div class="wrap">
<div class="disciplines-text-wrapper">
<h1>
Weiterverarbeitung
</h1>
<p>Nach dem Druck ist vor der Verarbeitung: Sammelheftung oder Klebebindung</p>
</div>
<i class="icon-right-circled"></i>Weitere Informationen
</div>
</div>
</div>

Related

little Issue with babylonjs scene border

I have a small issue with my babylonjs scene. When I click a mesh in the scene a border appears (in my browser the border is blue but it differs depending on the browser):
in google chrome
a friends browser
this is the html/css code of my component (I use vuejs):
<template>
<div class="wrapper">
<div class="Rahmen">
<div id="textblock">
<h1 id="welcome">Willkommen</h1>
<h4 id="welcome-text">
Planen Sie mit unserem Konfigurator einfach und
schnell Ihre individuelle Containertreppenl&oumlsung
</h4>
<br />
<br />
<span>So klappt's</span>
<b-button pill id="popover-help-button"><v-icon id="popover-help" name="question-circle" /></b-button>
<b-popover ref="popover"
target="popover-help-button"
triggers="hover"
placement="top">
Wählen Sie bitte aus wie viele Container sich in Ihrer Containeranlage in Höhe und Breite befinden.
<img src="#/assets/helpp1.gif" width="440" />
</b-popover>
</div>
<canvas id="renderCanvas"></canvas> <!-- babylon scene-->
</div>
</div>
</template>
<style>
#renderCanvas {
width: 100%;
height: 100%;
overflow: hidden;
}
.wrapper {
position: center;
}
.Rahmen {
padding-top: 7%;
margin: 0;
min-height: 600px;
}
#textblock {
padding-left: 7%;
position: center;
background-color: white;
margin-bottom: 2%;
}
#popover-help {
color: blue;
}
#popover-help-button {
background: transparent;
border: transparent;
left: 0%;
margin-left: 0%;
margin-top: 0.5%;
}
.popover {
max-width: 450px;
}
</style>
any suggestions?
Here is an example.It caused by tab-index.
https://forum.babylonjs.com/t/remove-border-of-rendering-canvas/16074
Would an extra CSS line like outline:none; help you out?

Css hover work, but not(:hover) don't do its purpose

I would like my hover to make the "hidding" div appear by fading in and then appearing, and when not(:hover) I want it to fade out and then disappear, I've tried this:
.éléments:not(:hover) #hidding {
font-size: 0;
opacity: 0;
transition: opacity 1s, font-size 2s 1s;
}
.éléments:hover #hidding {
background-color: #97e6bc;
width: 20em;
margin: 0 auto;
padding: 1em;
transition: font-size 1s, opacity 2s 1s;
}
<div class="éléments">
<div class="école">
<h3>Where is Charly ?</h3>
</div>
<div id="hidding">
<p>hidding</p>
</div>
<div class="école">
<h3>Where is Charly ?</h3>
</div>
<div id="hidding">
<p>hidding</p>
</div>
<div class="école">
<h3>Where is Charly ?</h3>
</div>
<div id="hidding">
<p>hidding</p>
</div>
</div>
But for an unknown reason the div instantly disappears and only the text seems affected by the :not(:hover), can someone explain me what is happening please?
You cannot have more than one <div id="hidding">. id must be unique at all times. Use <div class="hidding"> instead.
https://www.w3schools.com/hTML/html_id.asp
That being said, it is bad practice to use non-ascii characters in development.
I corrected these issues.
The cause of your problem is that you have some properties which a) are only defined in :hover state (width, padding, margin) and b) which are not defined when it comes to your rules for transition.
The second issue is that your .element:not(:hover) .hidding really should simply just be .elements .hidding. The reason for this is that anything that is defined in .element:not(:hover) .hidding immediately is no longer applied at all when hovering .elements.
.elements .hidding {
background-color: #97e6bc;
font-size: 0;
margin: 0 auto;
opacity: 0;
width: 20em;
transition: all 1s;
}
.elements:hover .hidding {
background-color: #97e6bc;
font-size: 16px;
opacity: 1;
padding: 1em;
transition: all 1s;
}
<div class="elements">
<div class="ecole">
<h3>Where is Charly ?</h3>
</div>
<div class="hidding">
<p>hidding</p>
</div>
<div class="ecole">
<h3>Where is Charly ?</h3>
</div>
<div class="hidding">
<p>hidding</p>
</div>
<div class="ecole">
<h3>Where is Charly ?</h3>
</div>
<div class="hidding">
<p>hidding</p>
</div>
</div>
There are multiple problems with your code, as noticed by many others:
Firstly, as connexo said, ids must be unique. Use class instead.
Secondly, as Temani Afif said, you shouldn't use special charactors like é. It's a bad coding practice that may cause errors.
The .elements:not(:hover) isn't a good idea for many reasons.
Don't put inanimate properties, like background-color, into a :hover Pseudo class.
You're trying to animate the transition property. This might be the source of most of your glitches.
But importantly, the use of .elements:not(:hover) is nonexistent. It seemes what you are trying to achieve is just .elements itself. The :not(:hover) is implied I guess. You should put all your default css formatting in .elements itself, including all your transitions. Put only properties you want to animate on :hover in the hover Pseudo class.
W3Schools: CSS Pseudo-classes
.elements .hidding {
height: 0;
width: 15em;
opacity: 0;
margin: 0 auto;
overflow: hidden;
box-sizing: border-box;
background-color: #97e6bc;
transition: opacity 1s, height 1s ease-out, width 1s ease-out;
}
.elements .hidding>p {
display: block;
padding: 1em;
margin: 0;
}
.elements:hover>.ecole>.hidding {
width: 20em;
height: 3em;
opacity: 1;
}
<div class="elements">
<div class="ecole">
<h3>Where is Charly ?</h3>
<div class="hidding">
<p>hidding</p>
</div>
</div>
<div class="ecole">
<h3>Where is Charly ?</h3>
<div class="hidding">
<p>hidding</p>
</div>
</div>
<div class="ecole">
<h3>Where is Charly ?</h3>
<div class="hidding">
<p>hidding</p>
</div>
</div>
</div>
I wouldn't animate the transition property, (I don't even think it's remotely possible). You might have better luck with CSS animations.
It works but you have written opacity 2s 1s;. This means opacity starts to be 1 after 1 seconds in 2 seconds of transition.
This is not the correct way. Use .elements #hidding{ instead. Then .elements:hover #hidding{. This question if full of wrongs :). Try to learn better before asking jsfiddle.net/90v2yLq8

Elements with opacity < 1 not rendering in chrome when not in first column

I have a site that gets divided into multiple columns. Whenever an element is not in the first column and has opacity set to < 1, it doesn't get rendered when its container has both the overflow y and border radius properties.
Shown in this fiddle
css
.main {
-webkit-column-width: 100px;
column-width: 100px;
max-height: 200px;
}
.main > div {
overflow-y:auto;
border-radius: 6px;
}
.opac {
opacity: 0.5;
}
html
<div class="main">
<div>
<div class="opac">element 1</div>
</div>
<div>
<div class="opac">element 2</div>
</div>
...
<div>
<div class="opac">element 30</div>
</div>
</div>
I'm using chrome 40.0.2214.94 (64-bit) on OSX 10.10.1. Works in Firefox.
That looks like a rendering bug. For now you can mitigate the effect by applying will-change: opacity to the parent elements:
.main > div {
overflow-y:auto;
border-radius: 6px;
will-change: opacity;
}
http://jsfiddle.net/yx1cp9f8/
Anther workaround apparently is to set the opacity on the parent element:
<div class="main">
<div class="opac">
<div >element 1</div>
</div>
<div class="opac">
<div >element 2</div>
</div>
...
<div class="opac">
<div >element 30</div>
</div>
Seems to work. (you seem to have forgotten to close your divs, so I did that as well)
Since the issue in chrome doesn't seem like it will be fixed anytime soon and the will-change: opacity fix doesn't allow pointer/click events, I've decided to just calculate what the rgb values would be with the desired opacity and hard code them in CSS.
I was using the opacity for disabled buttons and was only using a few of the bootstrap button types for this particular case, so it's not too bad of a hack.
.btn.btn-success[disabled] {
opacity: 1;
background: rgb(141, 194, 141);
}
.btn.btn-info[disabled] {
opacity: 1;
background: rgb(120, 187, 206);
}

Fade image out and fade text in on rollover

This is the website I'm working on: http://threesamples.tumblr.com
I'm having the most idiotic problem, but nothing I try seems to work, so I figured I'd come here.
I'm working with a Tumblr theme that doesn't have support for captions (except when clicking through to the image post itself).
What I'm trying to do is place the caption text inside a div on the top center of the photo, so that on rollover:
- photo fades out
- text fades in
Here is the CSS I've got so far:
article.type_photo .photo-stage {
background: {color:Photo Background};
position: absolute;
}
article.type_photo .photo-stage:hover {
background: {color: BackgroundColor};
opacity: 0.5;
transition: 0.75s;
-moz-transition-duration:0.75s;
-webkit-transition-duration:0.75s;
-o-transition-duration:0.75s;
}
article.type_photo .caption-wrap {
background: transparent;
width:720px;
height:300px;
padding-top:10px;
position: relative;
margin: 0 auto;
float: left;
}
article.type_photo .caption {
visibility: hidden;
position: absolute;
margin: 0 auto;
}
article.type_photo .caption:hover {
visibility: visible;
position: absolute;
color: #ffffff;
opacity: 1;
font-family:"Open Sans";
font-size:14px;
text-align: justify;
transition: 0.75s;
-moz-transition-duration:0.75s;
-webkit-transition-duration:0.75s;
-o-transition-duration:0.75s;
}
and here is the Tumblr code for dealing with photo posts:
{block:Photo}
<!-- Photo Post -->
<div class="photo-stage {select:Image Height}">
<div class="photo-wrap" style="background-image: url('{PhotoURL-HighRes}');">
{block:IndexPage}
<img src="{PhotoURL-HighRes}" />
</div>
{/block:IndexPage}
{block:PermalinkPage}
{LinkOpenTag}<img src="{PhotoURL-HighRes}" />{LinkCloseTag}
{/block:PermalinkPage}
</div>
</div>
<div class="caption">
{block:Caption}
{Caption}
{/block:Caption}
{block:Caption Hover}
{Caption Hover}
{/block:Caption Hover}
</div>
{/block:Photo}
I've managed to get the image to fade out, but cannot for the life of me get the text to fade in. Can someone tell me what I'm doing wrong?
So I'm not an expert but I think your problem is that position is not an animatable property. You need to specify that you only want the transition to apply to the visibility property, like so:
transition:visibility 0.75s;
-moz-transition-property:visibility;
-webkit-transition-property:visibility;
-o-transition-property:visibility;
-moz-transition-duration:0.75s;
-webkit-transition-duration:0.75s;
-o-transition-duration:0.75s;
(Or you should be able to merge it all into one statement for the browser-specific statements, too, but you specifically used transition-duration for those, so I left them that way.)
Source:Using CSS Transitions, CSS Animated Properties

what is the code for reset the text field form?

I want to set a button which allow the user to reset the contact form, is there any method to do it?
here is my coding for text field
<div style="float:left;width:600px;"><!--textfield-->
<div style="float:left;">
<div style="float:left;width:90px;padding-top:5px">
NAME
</div>
<div style="float:left;padding-top:4px">
:
<input type="text" class="textfield"/>
</div>
</div>
<div style="float:left;padding-top:8px;">
<div style="float:left;width:90px;padding-top:5px">
EMAIL ADDRESS
</div>
<div style="float:left;padding-top:2px">
:
<input type="text" class="textfield"/>
</div>
</div>
<div style="float:left;padding-top:8px;">
<div style="float:left;width:90px;padding-top:5px">
CONTACT NUMBER
</div>
<div style="float:left;padding-top:2px">
:
<input type="text" class="textfield"/>
</div>
</div>
<div style="width:120p;float:left;padding-top:8px;">
<div style="float:left;width:90px;padding-top:5px">
MESSAGE
</div>
<div style="float:left;padding-top:2px">
:
</div>
<div style="float:left;margin-left:3px;padding-top:2px;">
<textarea cols="48" rows="6" class="textfield"></textarea>
</div>
</div>
</div><!--textfield-->
</div><!--end leave your personal details-->
<div style="clear:both"></div>
<div>
<div id="buttonreset"><!--buttonreset-->
<img src="img/buttonreset1.png" width="54" height="24" alt="reset" />
</div><!--end.buttonreset-->
<div id="buttonsend"><!--buttonsend-->
<img src="img/buttonsend1.png" width="54" height="24" alt="send" />
</div><!--end.buttonsend-->
</div>
Css
.textfield {
font-family: CenturyGothic;
font-size: 12px;
color: #231F20;
resize: none;
text-align: left;
}
textarea {
border: thin solid #221F1F;
border-radius: 5px;
width: 430px;
height: 160px;
opacity: 0.8;
}
input {
border: thin solid #221F1F;
border-radius: 4px;
width: 430px;
height: 21px;
opacity: 0.7;
}
#buttonreset {
margin-top: 5px;
background-image: url(../img/buttonreset.png);
background-repeat: no-repeat;
height: 24px;
width: 54px;
margin-top: 10px;
margin-left: 410px;
float:left;
}
#buttonreset img {
-webkit-transition: opacity .5s ease-in-out;
-moz-transition: opacity .5s ease-in-out;
-o-transition: opacity .5s ease-in-out;
transition: opacity .5s ease-in-out;
opacity:0;
}
#buttonreset img:hover {
opacity:1;
cursor:pointer;
-webkit-animation-duration: 1s;
-webkit-animation-timing-function: linear;
Chrome, and Safari */
}
I haven't add any coding to my button, what code suitable for my button?
this is my fiddle:
http://jsfiddle.net/K5CJ4/
<input type='reset'>
is the easiest method.
[Edit]
Since you're trying to reset the form using an image, the easiest way is to use the reset() method in Javascript. (No need for a library like jQuery). To accomplish this, I simply added a bit of javascript to your <a> tag in your form, as well as wrapped the entire example in <form></form> tags, giving it an id of contactForm .
DEMO
use jQuery way to solve it. like this :
$("#buttonreset").click(function() { // div's id
$("#txtField1").val("");
$("#txtField2").val("");
});
Try to use :
<button type="reset" id="btnreset" value="Reset">Reset</button>
The button is a reset button (resets the form-data to its initial values)
#btnreset {
background-image: url("http://www.ricksdailytips.com/wp-content/uploads/2013/11/reset-button.gif");
border: 0 none;
height: 204px;
width: 200px;
}
If you want to automate this, you could set it such that the page refreshes the entire page after a given number of seconds. use the meta tag:
<meta http-equiv="refresh" content="(enter number of seconds before refresh);url=thispage.html" />