4
The 'Transition' option does not work in this code
What’s wrong?
If you can explain where I went wrong
I wanted her to come out slowly
<!DOCTYPE html>
<html>
<head>
<title>teste</title>
<style type="text/css">
div{
width: 500px;
height: 100px;
border:5px solid blue;
display: none;
}
</style>
</head>
<body>
<script type="text/javascript">
function chamar(){
document.getElementById("aparecer").style.display="block"
document.getElementById("aparecer").style.transition='all 3s'
}
</script>
<p onClick="chamar()">chamar</p>
<div id="aparecer"></div>
</body>
</html>
It would be like putting an animation in the attribute
visibilty
in the same situation as the question?– Laércio Lopes
@Laérciolopes in this case I suggest you take a look here: https://answall.com/a/44684/129 O
visibility
behaves like thedisplay
. Either it is or it is not, it does not allow transitions.– Sergio
Entedi Unaware of display information not working with Transition Entedi the 2 ways, but the second was what you wanted... Thank you...it was so simple
– Soreze martins