简体   繁体   中英

How to apply CSS based on conditional media query?

I got a WordPress page with three CTA buttons on it that need to be applied following CSS to when on resolutions of less than 576px and between 750px to 900px. Please help me understand how to write a conditional media query to apply the following CSS.

padding-left: 1rem;
padding-right: 1rem;
font-size: 1.1rem;

Use this queries and paste your code inside of both.

@media only screen and (max-width: 576px)  {...}
@media only screen and (min-width: 750px) and (max-width: 900px)  {...}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM