Media queries in CSS are a powerful new feature that you control the stylesheet based dimensions

preview_player
Показать описание
Media queries in CSS are a powerful new feature that let's you control the stylesheet based on the dimensions of some container. They are similar to how media queries help you differ the styling based on the viewport dimensions.
HTML used in this example ✨

button class="responsive-button"
span class="text" Add to Cart (span)
button

We first declare the button element to be a container, and then add a container query stating that when the width of the button is less than some defined amount, the text should be hidden

#css #html
Рекомендации по теме
Комментарии
Автор

Если размер кнопки меньше указаного размера то текст не отобажается, а иконка центрируется? Простой, хороший скрипт

Surn-tg
welcome to shbcf.ru