html and css آموزش
21.9K subscribers
487 photos
238 videos
92 files
311 links
ادمین :
@Maryam3771


تعرفه تبلیغات:
https://t.iss.one/alloadv/822
Download Telegram
This media is not supported in your browser
VIEW IN TELEGRAM
The :empty pseudo-class in CSS is used to select elements that do not contain child elements or text content.

This pseudo-class is useful for styling elements that have no content within them.

➡️For example, you can use :empty to hide or change the style of elements that do not contain text or other content


💎 @Htmlcss_channels | #css #JavaScript #HTML
Please open Telegram to view this post
VIEW IN TELEGRAM
🙏1
⭐️ Container Queries — a new way to make layouts responsive.

Before: @media rules reacted to screen width (e.g. under 768px → smaller font).
Problem: components behave differently in cards, sidebars, modals — viewport alone isn’t enough.

Container Queries let CSS adapt to a parent’s size, not the whole screen.

➡️ Example:

.card { container-type: inline-size; }

@container (max-width: 400px) {
.card-title { font-size: 1rem; }
}


How it works
• Mark a container with container-type.
• Use @container to style elements inside it.
• Components adapt to parent width, no global media hacks.
• Cleaner CSS, fewer JS tweaks, local responsive behavior.

📌 Supported natively in modern browsers — truly component-based CSS.


💎 @Htmlcss_channels | #css #JavaScript #HTML
Please open Telegram to view this post
VIEW IN TELEGRAM
1🙏1