search

Home  >  Q&A  >  body text

前端 - 让网站在手机端体验像原生应用一样,而在PC端正常体验和web站点一样可行么?

让网站在手机端体验像原生应用一样,而在PC端正常体验和web站点一样可行么?

如果可行,那怎么实现?

例如:在手机端显示的UI、布局、色调完全是针对手机定制的、在PC端,则是全屏大图,背景透明,各种炫酷的效果都用上了。 我知道做2套可以实现,现在的需求是只用一套页面如何实现这个效果? JS判断移动端访问设备并加载对应CSS样式 可行么? 但布局位置不一样,怎么解决?还有性能问题。。。。

PHP中文网PHP中文网2767 days ago418

reply all(4)I'll reply

  • 伊谢尔伦

    伊谢尔伦2017-04-17 11:49:31

    Responsive layout.
    Media query mobile browsers should all support it.
    But this only allows the page style to adapt to different screen sizes.

    If the mobile version wants to be like a native application, it is better to make two versions separately.
    It was a thankless task to put together. . .

    reply
    0
  • 阿神

    阿神2017-04-17 11:49:31

    Go and see if bat or some giants have made it, to what extent, and then study its source code

    reply
    0
  • 伊谢尔伦

    伊谢尔伦2017-04-17 11:49:31

    Doing adaptation~

    reply
    0
  • 迷茫

    迷茫2017-04-17 11:49:31

    I feel that the UI processed by the browser is obviously lagging compared to the native application, and the smoothness is still a bit worse

    reply
    0
  • Cancelreply