a!max Posted June 14, 2017 Report Share Posted June 14, 2017 Здравствуйте. Почему при наведении на 3 блок, нижние 2 блока смещаются резко вниз? В чем моя ошибка? Ссылка на архив с сайтом: https://yadi.sk/d/DaMKfImK3K8DiF Quote Link to comment Share on other sites More sharing options...
Silence Posted June 14, 2017 Report Share Posted June 14, 2017 6 минут назад, a!max сказал: Здравствуйте. Почему при наведении на 3 блок, нижние 2 блока смещаются резко вниз? В чем моя ошибка? Ссылка на архив с сайтом: https://yadi.sk/d/DaMKfImK3K8DiF .blocks:hover { box-shadow: 0 0 18px rgba(0,0,0,0.3); margin-top: 28px; } измени на: .blocks:hover { box-shadow: 0 0 18px rgba(0,0,0,0.3); } Quote Link to comment Share on other sites More sharing options...
a!max Posted June 14, 2017 Author Report Share Posted June 14, 2017 1 час назад, Silence сказал: .blocks:hover { box-shadow: 0 0 18px rgba(0,0,0,0.3); margin-top: 28px; } измени на: .blocks:hover { box-shadow: 0 0 18px rgba(0,0,0,0.3); } Я знаю, что без margin будет работать, ведь я сначала box-shadow делал Но нельзя просто так выкинуть свойство margin, мне нужен этот эффект "подпрыгивания/перемещения" Какой-то трабл наверно с float Quote Link to comment Share on other sites More sharing options...
Silence Posted June 14, 2017 Report Share Posted June 14, 2017 2 минуты назад, a!max сказал: Я знаю, что без margin будет работать, ведь я сначала box-shadow делал Но нельзя просто так выкинуть свойство margin, мне нужен этот эффект "подпрыгивания/перемещения" Какой-то трабл наверно с float Я не вижу разлику с margin и без margin ето просто hover efect Quote Link to comment Share on other sites More sharing options...
a!max Posted June 14, 2017 Author Report Share Posted June 14, 2017 2 минуты назад, Silence сказал: Я не вижу разлику с margin и без margin ето просто hover efect Хочу, чтобы поднимались блоки на несколько пикселей, но вот почему мне интересно некоторые блоки ведут себя странно... Silence 1 Quote Link to comment Share on other sites More sharing options...
Silence Posted June 14, 2017 Report Share Posted June 14, 2017 1 минуту назад, a!max сказал: Хочу, чтобы поднимались блоки на несколько пикселей, но вот почему мне интересно некоторые блоки ведут себя странно... Попробуй вместо margin поставит ето: -webkit-transform: translateY(-5px); -ms-transform: translateY(-5px); -o-transform: translateY(-5px); a!max 1 Quote Link to comment Share on other sites More sharing options...
a!max Posted June 14, 2017 Author Report Share Posted June 14, 2017 4 минуты назад, Silence сказал: Попробуй вместо margin поставит ето: -webkit-transform: translateY(-5px); -ms-transform: translateY(-5px); -o-transform: translateY(-5px); Работает, но я так понимаю webkit это только для chrome? Silence 1 Quote Link to comment Share on other sites More sharing options...
Silence Posted June 14, 2017 Report Share Posted June 14, 2017 3 минуты назад, a!max сказал: Работает, но я так понимаю webkit это только для chrome? https://www.w3schools.com/css/css3_transitions.asp Quote Link to comment Share on other sites More sharing options...
a!max Posted June 14, 2017 Author Report Share Posted June 14, 2017 2 минуты назад, Silence сказал: https://www.w3schools.com/css/css3_transitions.asp Спасибо за ответ, теперь пойду спокойно спать Silence 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.