how to specify a different image in css depending if the user visits on a desktop or a mobile browser

前端 未结 3 1782
盖世英雄少女心
盖世英雄少女心 2020-12-31 12:44

Just a question about css for mobile devices,

i have an image that is 1260px wide on my website and when i look at it on the phone it destorts the website as the res

3条回答
  •  隐瞒了意图╮
    2020-12-31 13:44

    You're looking for media queries. You can write styles conditional on width:

    http://webdesignerwall.com/tutorials/responsive-design-with-css3-media-queries

    http://www.w3.org/TR/css3-mediaqueries/

提交回复
热议问题