Есть ли способ, используя только css, остановить все переходы для элементов, когда определенный элемент имеет фокус.
пример: мой ввод имеет переход, зависящий от .container: hover, и когда он получает фокус, всепереход останавливается, но только для ввода, есть ли способ остановить переход для других классов, когда ввод имеет фокус?
<!DOCTYPE html>
<html>
<head>
<style>
.container {
padding: 0px;
margin: 0px;
height:50px;
width:50px;
background-color:steelblue;
-webkit-transition: width 0.2s ease-in;
-webkit-transition-delay: 0s;
-webkit-transition-timing-function: linear;
}
.search-icon{
float: left;
position: relative;
top: 10px;
left:18px;
font-size: 26px;
color: white;
cursor: default;
}
.container:hover
{
width:250px;
}
.container:hover .input{
visibility: visible;
width: 185px;
}
.container .search-input{
position: relative;
top: 0px;
left: 0px;
display: block;
margin: 0px;
padding: 10px;
}
.input{
visibility: hidden;
float: left;
position: absolute;
top: 13px;
left: 55px;
width: 30px;
height: 24px;
padding: 0px;
margin: 0px;
border-color: white;
background-color: white;
-webkit-transition: width 0.3s linear;
-webkit-transition-delay: 0s;
}
input[type="text"]:focus {
-webkit-transition: none;
visibility: visible;
width: 185px;
}
</style>
</head>
<body>
<div class="container">
<div class="search-icon">
<b>?</b>
</div>
<div class="search-input">
<input type="text" class="input">
</div>
</div>
</body>
</html>