0

Is there a way to provide a user with a basic HTML webpage from the same link according to browser type? Specifically, when navigating to www.mysite.com via a desktop browser, the user sees one large web page, but navigating there from a mobile shows a smaller web page.

4

2 回答 2

1

Bootstrap 响应式设计 将帮助您实现目标。

因此,如果您将引导库作为站点的一部分包含在内,那么向您的 HTML 标记添加一个类将使其行为如此。

<body>
   <div class="visible-desktop">
      Content for big screen here
   </div>

   <div class="visible-phone">
      Content for phones here
   <div>
</body
于 2013-05-14T20:48:09.087 回答
0

您可以使用样式表来实现这一点。

屏幕只会显示在桌面上,而掌上电脑只会显示在移动设备上。

http://mobile.smashingmagazine.com/2010/11/03/how-to-build-a-mobile-website/#mobile-stylesheets

于 2013-05-10T13:09:48.740 回答