我正在构建一个以移动设备为优先级的自定义网格,因为网站的大多数用户需要通过移动设备访问该网站,同时观察夜空。问题是,当我在移动设备上呈现页面时,我得到了这个:
请原谅我的链接Samsung Galaxy S4 screenshot
现在,如果我从网上加载,我会this
这是我的index.html原型。我的大学从未教过我们CSS框架,他们也没有涵盖移动响应式设计。我已经连续读了差不多一个月,但这是我第一次尝试使用它们。
<!DOCTYPE html>
<!--[if IE 8]> <html class="no-js lt-ie9" lang="en" > <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width" />
<title>Fort Bend Astronomy Club » Home</title>
<link rel="stylesheet" href="stylesheets/app.css" />
<link rel="stylesheet" href="stylesheets/main.css" />
<script src="javascripts/vendor/custom.modernizr.js"></script>
</head>
<body>
<!-- Begin Navigation -->
<section class="navigation">
<header class="small-12 columns">
<nav class="top-bar">
<ul class="title-area">
<li class="name">
<h1 class="center-hack"><a href="index.html"><img src="images/fbac_logo.png" class="logo" alt="Fort Bend Astronomy Club" /></a></h1>
</li>
<li class="toggle-topbar menu-icon">
<a href="#"><span></span></a>
</li>
</ul>
<section class="top-bar-section">
<ul class="left">
<li class="divider"></li>
<li class="active">
<a href="#">Home</a>
</li>
<li class="divider"></li>
<li class="has-dropdown">
<a href="#">About</a>
<ul class="dropdown">
<li>
<a href="#">About FBAC</a>
</li>
<li>
<a href="#">History of FBAC</a>
</li>
<li class="has-dropdown">
<a href="#">Club Donations</a>
<ul class="dropdown">
<li>
<a href="#">Donate to FBAC</a>
</li>
</ul>
</li>
<li class="has-dropdown">
<a href="#">Club Meetings</a>
<ul class="dropdown">
<li>
<a href="#">
General Information
</a>
</li>
<li>
<a href="#">Meeting Archives</a>
</li>
</ul>
</li>
<li>
<a href="#">
FBAC Articles Archive
</a>
</li>
</ul>
</li>
<li class="divider"></li>
<li class="has-dropdown">
<a href="#">
Club Programs
</a>
<ul class="dropdown">
<li class="has-dropdown">
<a href="#">
Astronomy on Wheels
</a>
<ul class="dropdown">
<li>
<a href="#">
General Information
</a>
</li>
<li>
<a href="#">
AOW Contact Form
</a>
</li>
</ul>
</li>
<li class="has-dropdown">
<a href="#">
FBAC Volunteer T-Shirt Program
</a>
<ul class="dropdown">
<li>
<a href="#">
General Information
</a>
</li>
<li>
<a href="#">
Shirt Request Form
</a>
</li>
</ul>
</li>
<li>
<a href="#">
Telescope Loaner Program
</a>
</li>
</ul>
</li>
<li class="has-dropdown">
<a href="#">
Club Observing
</a>
<ul class="dropdown">
<li>
<a href="#">
George Observatory
</a>
</li>
<li>
<a href="#">
East Dome
</a>
</li>
<li>
<a href="#">
HMNS/FBAC Memo of Understanding
</a>
</li>
</ul>
</li>
<li class="has-dropdown">
<a href="#">
Club Tools
</a>
<ul class="dropdown">
<li>
<label>
Public Tools
</label>
</li>
<li>
<a href="#">
Observing List/Star Charts
</a>
</li>
<li>
<a href="#">
Calendar
</a>
</li>
<li>
<a href="#">
Web Links
</a>
</li>
<li>
<label>
Members
</label>
</li>
<li>
<a href="#">
Manage Profile/Renewal
</a>
</li>
<li>
<a href="#">
Borrow Telescope
</a>
</li>
<li>
<a href="#">
East Dome Website
</a>
</li>
</ul>
</li>
<li>
<a href="#">
Join FBAC
</a>
</li>
</ul>
<ul class="right">
<li class="has-form">
<a href="#" class="small button">
Login
</a>
</li>
</ul>
</section>
</nav>
</header>
</section>
<!-- End Navigation -->
<!-- Begin Content Area -->
<section class="small-9 columns content-area">
<article class="article-box">
<div class="headers">
<h1 class="article-title">
Test Story
</h1>
<h3 class="bylines">
By: <a href="#">Test User</a> on 11/10/2013 at 09:00
</h3>
</div>
<div class="story">
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis egestas tincidunt mauris. Proin gravida quis magna at congue. Nam ac eleifend leo, sed hendrerit dolor. Curabitur sed velit posuere, auctor urna eu, adipiscing sem. Maecenas ac nisi id velit gravida pharetra. Quisque dapibus ligula non massa sollicitudin, sed pulvinar enim luctus. Quisque dapibus bibendum tempor. Proin tristique, purus non elementum laoreet, tellus magna volutpat orci, ut pellentesque lectus metus eget nulla. Integer nec dui nec dolor interdum pulvinar. Quisque tincidunt egestas eros. Fusce accumsan nisl vel faucibus egestas. Morbi quis ultrices arcu. Sed interdum ac metus id venenatis. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. In hac habitasse platea dictumst.
Vivamus neque lectus, consectetur sed arcu consequat, vehicula volutpat massa. Quisque a erat molestie, laoreet tellus a, faucibus nisi. Nunc dignissim augue volutpat massa malesuada tincidunt. Etiam placerat purus vitae ante blandit fringilla. Proin molestie arcu sed lobortis tristique. Maecenas sed condimentum dui. Curabitur accumsan, enim in tristique eleifend, purus urna malesuada lorem, nec auctor mauris lacus tristique nunc.</p>
<p>Sed bibendum at ipsum et tincidunt. Nulla ac mi nec justo interdum commodo. Duis sagittis vestibulum rutrum. Donec tristique id odio vitae pellentesque. Donec adipiscing facilisis ligula et tristique. Aliquam nec placerat dui. Phasellus dignissim nunc ac scelerisque tristique. Curabitur et enim nec nisl elementum feugiat. Duis suscipit magna ut scelerisque interdum. Vestibulum sit amet sem congue, condimentum orci ac, imperdiet mauris. Donec quis purus sit amet lacus blandit malesuada vel blandit ante. Aliquam erat volutpat. Mauris dignissim lacus at diam porttitor, semper gravida urna dapibus.</p>
<p>Praesent varius varius mauris, sed hendrerit odio pretium et. Nunc tincidunt sit amet sem id vestibulum. Duis hendrerit cursus tortor, sit amet eleifend nibh luctus ullamcorper. Aenean et est consectetur, venenatis eros non, malesuada nunc. Sed adipiscing dignissim blandit. Sed et aliquet enim. Duis pulvinar id purus non pellentesque. Aliquam lacinia blandit purus id mattis. Praesent id pharetra quam. Quisque aliquam et orci at consequat. Nulla sit amet metus egestas, luctus erat in, fringilla tortor. Nam consectetur, erat ac laoreet pretium, erat magna fringilla diam, et euismod ante neque et dui. Pellentesque eu mollis ligula, eget elementum urna. Curabitur quam nunc, sollicitudin eget orci non, pharetra aliquet sem.</p>
<p>Cras mattis tincidunt justo, eget molestie turpis ultricies sit amet. Donec pharetra orci nisi, a congue eros scelerisque vel. Donec pulvinar gravida mauris et ullamcorper. Nulla facilisi. Phasellus at est vulputate, ultricies velit in, euismod mauris. Vivamus sed eros tincidunt, faucibus libero a, auctor neque. Aenean a pellentesque massa. Mauris lacinia justo nibh, nec molestie arcu rhoncus in. In non tellus a diam posuere blandit in nec metus. Nullam fermentum turpis non tempus placerat. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Ut vulputate aliquet quam, nec dignissim elit. Fusce dignissim lorem id dictum laoreet. Fusce blandit eget diam a fringilla.</p>
</div>
</article>
<article class="article-box">
<div class="headers">
<h1 class="article-title">
Test Story
</h1>
<h3 class="bylines">
By: <a href="#">Test User</a> on 11/10/2013 at 09:00
</h3>
</div>
<div class="story">
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis egestas tincidunt mauris. Proin gravida quis magna at congue. Nam ac eleifend leo, sed hendrerit dolor. Curabitur sed velit posuere, auctor urna eu, adipiscing sem. Maecenas ac nisi id velit gravida pharetra. Quisque dapibus ligula non massa sollicitudin, sed pulvinar enim luctus. Quisque dapibus bibendum tempor. Proin tristique, purus non elementum laoreet, tellus magna volutpat orci, ut pellentesque lectus metus eget nulla. Integer nec dui nec dolor interdum pulvinar. Quisque tincidunt egestas eros. Fusce accumsan nisl vel faucibus egestas. Morbi quis ultrices arcu. Sed interdum ac metus id venenatis. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. In hac habitasse platea dictumst.
Vivamus neque lectus, consectetur sed arcu consequat, vehicula volutpat massa. Quisque a erat molestie, laoreet tellus a, faucibus nisi. Nunc dignissim augue volutpat massa malesuada tincidunt. Etiam placerat purus vitae ante blandit fringilla. Proin molestie arcu sed lobortis tristique. Maecenas sed condimentum dui. Curabitur accumsan, enim in tristique eleifend, purus urna malesuada lorem, nec auctor mauris lacus tristique nunc.</p>
<p>Sed bibendum at ipsum et tincidunt. Nulla ac mi nec justo interdum commodo. Duis sagittis vestibulum rutrum. Donec tristique id odio vitae pellentesque. Donec adipiscing facilisis ligula et tristique. Aliquam nec placerat dui. Phasellus dignissim nunc ac scelerisque tristique. Curabitur et enim nec nisl elementum feugiat. Duis suscipit magna ut scelerisque interdum. Vestibulum sit amet sem congue, condimentum orci ac, imperdiet mauris. Donec quis purus sit amet lacus blandit malesuada vel blandit ante. Aliquam erat volutpat. Mauris dignissim lacus at diam porttitor, semper gravida urna dapibus.</p>
<p>Praesent varius varius mauris, sed hendrerit odio pretium et. Nunc tincidunt sit amet sem id vestibulum. Duis hendrerit cursus tortor, sit amet eleifend nibh luctus ullamcorper. Aenean et est consectetur, venenatis eros non, malesuada nunc. Sed adipiscing dignissim blandit. Sed et aliquet enim. Duis pulvinar id purus non pellentesque. Aliquam lacinia blandit purus id mattis. Praesent id pharetra quam. Quisque aliquam et orci at consequat. Nulla sit amet metus egestas, luctus erat in, fringilla tortor. Nam consectetur, erat ac laoreet pretium, erat magna fringilla diam, et euismod ante neque et dui. Pellentesque eu mollis ligula, eget elementum urna. Curabitur quam nunc, sollicitudin eget orci non, pharetra aliquet sem.</p>
<p>Cras mattis tincidunt justo, eget molestie turpis ultricies sit amet. Donec pharetra orci nisi, a congue eros scelerisque vel. Donec pulvinar gravida mauris et ullamcorper. Nulla facilisi. Phasellus at est vulputate, ultricies velit in, euismod mauris. Vivamus sed eros tincidunt, faucibus libero a, auctor neque. Aenean a pellentesque massa. Mauris lacinia justo nibh, nec molestie arcu rhoncus in. In non tellus a diam posuere blandit in nec metus. Nullam fermentum turpis non tempus placerat. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Ut vulputate aliquet quam, nec dignissim elit. Fusce dignissim lorem id dictum laoreet. Fusce blandit eget diam a fringilla.</p>
</div>
</article>
</section>
<!-- End Content Area -->
<!-- Begin Side Bar Area -->
<section class="small-3 columns right-sidebar">
<div class="clocks">
Clock Scripts
</div>
<div class="weather">
Weather API
</div>
<div class="lunar">
Moon Clock
</div>
<div class="banners">
Banners
</div>
</section>
<!-- End Side Bar Area -->
<!-- Begin Footer Section -->
<section class="small-12 columns upper-footer">
<div class="small-4 columns memberships">
Memberships
</div>
<div class="small-4 columns hccs">
HCCS Partner
</div>
<div class="small-4 columns hmns">
HMNS Partner
</div>
</section>
<section class="small-12 columns lower-footer">
<div class="small-12 columns sitemap">
Sitemap
</div>
<div class="small-12 columns copyrights">
<p class="copyright-details">
Copyright Fort Bend Astronomy Club 1984-2014©<br />
Web Design by Nathan Jones Copyright 2013-2014©
</p>
</div>
</section>
<!-- End Footer Section -->
<!-- Script Section -->
<script>
document.write('<script src=' +
('__proto__' in {} ? 'javascripts/vendor/zepto' : 'javascripts/vendor/jquery') +
'.js><\/script>');
</script>
<script src="javascripts/foundation/foundation.js"></script>
<script src="javascripts/foundation/foundation.alerts.js"></script>
<script src="javascripts/foundation/foundation.clearing.js"></script>
<script src="javascripts/foundation/foundation.cookie.js"></script>
<script src="javascripts/foundation/foundation.dropdown.js"></script>
<script src="javascripts/foundation/foundation.forms.js"></script>
<script src="javascripts/foundation/foundation.interchange.js"></script>
<script src="javascripts/foundation/foundation.joyride.js"></script>
<script src="javascripts/foundation/foundation.magellan.js"></script>
<script src="javascripts/foundation/foundation.orbit.js"></script>
<script src="javascripts/foundation/foundation.placeholder.js"></script>
<script src="javascripts/foundation/foundation.reveal.js"></script>
<script src="javascripts/foundation/foundation.section.js"></script>
<script src="javascripts/foundation/foundation.tooltips.js"></script>
<script src="javascripts/foundation/foundation.topbar.js"></script>
<script>
$(document).foundation();
</script>
</body>
</html>
我的问题是:当我布局网格时,我应该为每个内容区使用小12吗?或者我的代码在区分方面是否正确(例如内容小-9和侧边栏小-3?如果我的代码是正确的,我可能需要包装器来使网站正确呈现吗?
答案 0 :(得分:0)
您可以遵循的一个基本移动UI规则是永远不会在移动设备中使用侧边栏。如果您使用基础
,它可能是这样的<div class="row">
<div class="small-12 large-9 columns">
// Main content here
</div>
<div class="small-12 large-3 columns">
// Sidebar here
</div>
</div>
至少这是我本应该做的。同时在移动设备上向用户显示重要信息。它实际上没有必要在移动设备上显示与在桌面上显示相同的内容。
在你的情况下,Widgets的侧边栏不是那么重要(看起来不重要),因此可以在底部显示或者可以完全隐藏