什么是响应式网站?为什么要使用响应式网站?以及如何开发这样的网站?
是否有任何框架可用于开发响应式网站?
响应式网站:一个设计灵活的网站,适用于各种尺寸的设备,如手机、平板电脑、笔记本电脑、大屏幕电脑。
为什么响应:提供跨多个平台(手机、平板电脑、笔记本电脑、大屏幕计算机)的良好且用户友好的界面。
如何开发响应式网站:您可以使用媒体查询为不同大小的设备创建响应式网站:
// Extra small devices (portrait phones, less than 576px)
@media (max-width: 575px) { ... }
// Small devices (landscape phones, 576px and up)
@media (min-width: 576px) and (max-width: 767px) { ... }
// Medium devices (tablets, 768px and up)
@media (min-width: 768px) and (max-width: 991px) { ... }
// Large devices (desktops, 992px and up)
@media (min-width: 992px) and (max-width: 1199px) { ... }
// Extra large devices (large desktops, 1200px and up)
@media (min-width: 1200px) { ... }
您必须为不同的媒体查询大小编写 css。
前端 CSS 框架:有很多框架可用于制作响应式网站
引导程序 4:http : //getbootstrap.com/
语义用户界面:https : //semantic-ui.com/
还有更多,但对于初学者来说,Bootstrap 是最好的学习方法。
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句