media-query
Media Queries are a way to target browsers by certain characteristics, features, and user preferences, then apply styles, or run other code based on those things. They are a key part of responsive web design, as they allow you to create different layouts depending on the size of the viewport, but they can also be used to detect other things about the environment your site is running on, for example whether the user is using a touchscreen rather than a mouse. Media queries are used for the following:
- conditionally apply styles with the CSS
@media
and@import
at-rules
- target specific media for the
<style>
,<link>
,<source>
, and other HTML elements with themedia=
attribute
- test and monitor media states using the
Window.matchMedia()
andEventTarget.addEventListener()
methods
A media query is composed of an optional media type and any number of media feature expressions, which may optionally be combined in various ways using logical operators.
- Media types define the broad category of device for which the media query applies. The type is optional except when using the not or only logical operators.
* **all:** Suitable for all devices.
* **print:** Intended for paged material and documents viewed on a screen in print preview mode.
* **screen:** Intended primarily for screens.
- Media features describe a specific characteristic of the user agent, output device, or environment. Media Queries Level 4 groups 18 media features into 5 categories.
* **Viewport/Page Characteristics**
* **Display Quality**
* **Color**
* **Interaction**
* **Video-prefixed:** The spec references user agents, including TVs, that render video and graphics in two separate planes that each have their own characteristics. _(upcoming Media Queries Level 5)_
- Logical operators can be used to compose a complex media query: not, and, and only. You can also combine multiple media queries into a single rule by separating them with commas.
Here are 39 public repositories matching this topic...
In this project, I built a webpage that dynamically responds as you adjust the size of your screen.
-
Updated
Apr 24, 2023 - CSS
This is an animated login form for the user
-
Updated
Jun 6, 2023 - CSS
This is a Responsive Webpage, check it on Mobile phone.
-
Updated
May 19, 2024 - CSS
Media query, images, retina, and typography responsiveness
-
Updated
Jan 8, 2019 - CSS
This is a personal portfolio website with responsive design using HTML, CSS, Media Query
-
Updated
Sep 19, 2023 - CSS
Aprendizado de CSS Grid: Grid-template-area, Grid-area, Grid-column, Grid-row e Media Queries
-
Updated
Oct 16, 2021 - CSS
It'll help you write media queries the easy way, plus other interesting functions to make you more productive coding css.
-
Updated
Sep 16, 2018 - CSS
Browser window dimensions via CSS
-
Updated
Aug 25, 2017 - CSS
-
Updated
Jan 23, 2022 - CSS
Desafio de codificação Front-End, componente de visualização de artigo.
-
Updated
Jul 6, 2022 - CSS
It's my Day-13 of #100dayscodingchallenge I created this Fully Animated & Responsive WhatGym site with HTML CSS Javascript. Clone of SidCup Golf site. Must checkout: 👇
-
Updated
Mar 29, 2024 - CSS
Experiment to test the rendering speed of media queries.
-
Updated
Mar 15, 2016 - CSS
Responsive website using Flexbox and Media Queries
-
Updated
Sep 3, 2024 - CSS
Repositório contendo os arquivos do Projeto Login, criado pelo @gustavoguanabara, no capítulo 26 do curso de HTML5 e CSS3 do Curso em Vídeo. Seu objetivo foi colocar em prática todos os conhecimentos adquiridos no Módulo 4, adicionando ao site as media queries e os formulários.
-
Updated
Dec 27, 2023 - CSS
Front-end Fundamentals - How To Use Media Queries For Responsive Websites Companion Code
-
Updated
Feb 3, 2017 - CSS
Responsive design navigation creation
-
Updated
Jul 27, 2016 - CSS
Agency Business is a single page flat bootstrap responsive web template. You can use this template for any type of website. This web template is built in a fancy style however it can be used as per the user requirements.
-
Updated
Nov 3, 2019 - CSS
Ecommerce Registered & Login UI Using HTML, CSS & Media Query.
-
Updated
Jan 17, 2023 - CSS
Created by Håkon Wium Lie, W3C
Released June 19, 2012
- Followers
- 6 followers
- Website
- drafts.csswg.org/mediaqueries
- Wikipedia
- Wikipedia