What's the most efficient way to hide content for a mobile version of a site?

前端 未结 5 1930
说谎
说谎 2021-01-20 16:03

I\'m working on a mobile version of a large site. There\'s a lot of content from the full site that\'s not needed for mobile.

What is the best way to hide this? i.e

5条回答
  •  梦毁少年i
    2021-01-20 16:29

    Given the case where the content for mobile is much smaller than the original version, it is a good idea to not share code as much as possible. Put your code in a seperate folder for the mobile app. You don't state how small is small, but it may be worth your while to do this even if it means a smalll amount of duplication.

    Sometimes it is better to be pragmatic rather than follow to the letter a set of rules, such as DRY.

提交回复
热议问题