【JQuery NoviceToNinja系列】01 开篇 Html页面设计和布局

01 开篇 Html页面设计和布局

index.html

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title>StarTrackr !</title>
    <link href="~/favicon.ico" rel="shortcut icon" type="image/x-icon" />
    <meta name="viewport" content="width=device-width" />

    <link rel="stylesheet" href="./css/base.css" />
    <!--<link rel="stylesheet" href="../../css/base.css"/>-->

    <script src="../../lib/jquery-1.7.1.min.js" type="text/javascript" charset="utf-8"></script>
    <script type="text/javascript" src="script.js"></script>
</head>
<body>
    <div id="container">
        <div id="header">
            <h1>StarTrackr!</h1>
        </div>
        <div id="content">
            <h2>
                欢迎光临!
            </h2>
            <div id="navigation">
                <ul>
                    <li><a href="#">首页</a></li>
                    <li><a href="#">现在购买!</a></li>
                    <li><a href="#">关于我们</a></li>
                    <li><a href="#">礼物</a></li>
                </ul>
            </div>
            <p id="intro">
                欢迎来到 <strong>StarTrackr!</strong> 欢迎来到StarTrackr !地球的超级明星跟踪和监控服务。需要知道世界上最好的乐队,音乐家或生产商在2.2平方米? 你来对地方了。我们有一个非常特别的本周的特别在b级名人,这么快!
            </p>
            <p id="disclaimer">
                免责声明! 这项服务并不打算为那些有犯罪意图。名人就像人,他们的隐私应该得到尊重。
            </p>
            <div id="news">
                <h2>最新消息</h2>
                <p>
                    Which member of the seminal calypso/lectro band <em>C&amp;C Music Sweatshop</em> was spotted last night at <em>Dirt</em>, the trendy New York restaurant that serves only food caught and retrieved by the chef‘s own hands?
                    <span class="spoiler">Yes! It‘s the ever-effervescent, <em>Glendatronix</em>!</span>
                </p>
                <p>今天谁失去了唱片合约? <span class="spoiler">The Zaxntines!</span></p>
            </div>
            <div>
                <h2 class="heading">我们的明星</h2>
                <p class="info">
                    我们有一个不断变化的新芯片的名人。 但它可以每周只小动物意识到他们已经标记,所以你必须快!
                </p>
                <table class="data" id="celebs">
                    <thead >
                        <tr>
                            <th>ID</th>
                            <th>Name</th>
                            <th>Occupation</th>
                            <th>Approx. Location</th>
                            <th>Price</th>
                        </tr>
                    </thead>
                    <tbody>
                        <tr>
                            <td>203A</td>
                            <td>Johny Stardust (<a href="bio.pdf">bio</a>)</td>
                            <td>Front-man</td>
                            <td>Los Angeles</td>
                            <td>$39.95</td>
                        </tr>
                        <tr>
                            <td>141B</td>
                            <td>Beau Dandy (<a href="img.jpg">pic</a>,<a href="bio.pdf">bio</a>)</td>
                            <td>Singer</td>
                            <td>New York</td>
                            <td>$39.95</td>
                        </tr>
                        <tr>
                            <td>2031</td>
                            <td>Mo‘ Fat (<a href="img.jpg">pic</a>)</td>
                            <td>Producer</td>
                            <td>New York</td>
                            <td>$19.95</td>
                        </tr>
                        <tr>
                            <td>007F</td>
                            <td>Kellie Kelly (<a href="bio.pdf">bio</a>,<a href="w.doc">press</a>)</td>
                            <td>Singer</td>
                            <td>Omaha</td>
                            <td>$11.95</td>
                        </tr>
                        <tr>
                            <td>8A05</td>
                            <td>Darth Fader (<a href="img.jpg">pic</a>)</td>
                            <td>DJ</td>
                            <td>London</td>
                            <td>$19.95</td>
                        </tr>
                        <tr>
                            <td>6636</td>
                            <td>Glendatronix  (<a href="bio.pdf">bio</a>,<a href="w.doc">press</a>)</td>
                            <td>Keytarist</td>
                            <td>London</td>
                            <td>$39.95</td>
                        </tr>
                    </tbody>
                </table>
            </div>

            <div id="comment">
                <h2>留下你的评论</h2>
                名称::<br />
                <input type="text" /><br />
                评论:<br />
                <textarea rows="5" cols="30" name="comment"></textarea>
            </div>

            <h2>细则</h2>
            <p id="fine_print">
                Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
            </p>

        </div>
        <div id="footer">
            <p>
                &copy; Copyright 2010 CelebriTracker Productions
            </p>
        </div>
    </div>
</body>
</html>

无css样式事效果:

base.css

#navigation {
    float: right;
    width: 150px;
}

#intro {
    width: 450px;
}

body {
    font-family: "Lucida Sans Unicode", "Ludica Grande", sans-serif;
    color: #3e3e3e;
    background: #94C5EB url("../images/background-grad.png") repeat-x;
    font-size: 15px;
}

p {
    padding: 5px;
}

a {
    color: #008b8b;
}

#container {
    margin: 0 auto;
    text-align: left;
    width: 650px;
}

#header{
    height: 60px;
    color: #172322;
    background: transparent url(../images/header-corners.png) no-repeat bottom left;
}

#header h1 {
    padding: 0;
    margin: 0;
}

#content{
    background-color: #fff;
    padding: 0 15px 10px 15px;
} 

#footer {
    background-color: #fff;
    padding: 15px;
}

h2 {
    border-bottom: 2px solid #006400; /*效果下面有个下划线*/
    color: #b22222;
    padding-top: 10px;
    margin-top: 0;                    /*往上提升*/
}

table {
    border-collapse: collapse;
    font-size: 12px;
    margin: 0 20px 20px 20px;
    border-top: 2px solid #006400; /*效果上面有个下划线*/
    width: 480px;
}

th {
    border-bottom: 2px solid #006400;
    color: #b22222;
    font-size: 14px;
    font-weight: normal;           /*不加粗*/
    text-align: left;
    padding: 3px 8px;
}

td {
    padding: 6px;
}

添加样式后的效果:

【JQuery NoviceToNinja系列】01 开篇 Html页面设计和布局

时间: 2024-08-13 07:43:51

【JQuery NoviceToNinja系列】01 开篇 Html页面设计和布局的相关文章

【JQuery NoviceToNinja系列】目录

[JQuery NoviceToNinja系列]目录 [JQuery NoviceToNinja系列]01 开篇 Html页面设计和布局 [JQuery NoviceToNinja系列]目录

ASP.NET MVC+EF框架+EasyUI实现权限管理系列之开篇

原文:ASP.NET MVC+EF框架+EasyUI实现权限管理系列之开篇 前言:博客又有一段时间没有更新了,心里感觉这段时间空空的,好像什么都没有学下,所以就想写博客,所以就有了这个系列,这里当然也要感谢大家了,因这个项目我已经上传了,得到了很多网友的评价,也有好多人发邮件给我说这个框架容易出现问题,不能访问,这也是支持我写这个系列的动力,我将这个项目写成一个系列,可能要很长时间吧,但是我肯定会一直坚持,如果我哪里写的不好欢迎大家指出我们共同学习,而且我理解的也不是很透彻,所以我想在写这样一遍

移动端重构系列1——新建空白页面

移动端重构系列-mobile 本系列文章,如果没有特别说明,兼容安卓4.0.4+,测试demo html5文档申明 <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>Document</title> </head> <body> </body> </html> meta标签 <meta nam

Windows内核原理系列01 - 基本概念

1.Windows API Windows 应用编程接口(API)是针对WIndwos操作系统用户模式的系统编程接口,包含在WindwosSDK中. 2.关于.NET .NET由一个被称为FCL的类库和一个被称为CLR的公共语言运行库组成.FCL是建立在CLR之上的,而CLR是一组标准的COM服务器,提供了垃圾回收,即时编译类型检验等特性.由于CLR的这些特性,使得开发人员的生产效率得以提高..NET框架与组建的关系如下: .NET应用程序 用户模式(托管代码) —————————— 类库(FC

跨终端响应式页面设计入门

跨终端/响应式页面不外乎是让各种分辨率的屏幕都能顺利阅读你的页面,常规来讲一个跨终端页面,在宽屏的电脑上看和在小屏幕手机上看的布局是不同的,布局不同的原因是为了让读者更好地阅读你的页面,见下图: 这里有点要提到的是,我们常规会将PC版的页面和移动端设备的页面独立开来设计,这样会让PC端的页面布局更灵活和好维护.如果你希望你的页面能适配包括PC端在内的任何设备,那么下面几个小工具可以方便你顾及旧版本IE所存在的困扰: ⑴ IE8-不能识别HTML5的<hearder>.<article&g

小白C#窗体系列-01.简易浏览器

最近重伤,今天正好放假,就抽个空出C#第一集,开发完毕... 如果你看不到这篇文章,那过一天就可以看见了. 软件下载(.NET 4.0 框架)http://pan.baidu.com/s/1c03X7vM[源码看下面] 一.设计图纸: 二.代码分析 1.后退键. 前进键.停止键.刷新键:这几个功能本来我是准备用个数组来存储,可以前进后退的,后来啃他自带方法的时候发现微软提供了方法,也就偷个懒了后退按钮 this.webBrowser1.GoBack(); 前进按钮 this.webBrowser

java io系列01之 &quot;目录&quot;

javaIO系列转载出处:http://www.cnblogs.com/skywang12345/p/io_01.html 该分类所有博文,均转载同一作者,后边不再累赘标名. java io 系列目录如下: 01. java io系列01之  "目录" 02. java io系列02之 ByteArrayInputStream的简介,源码分析和示例(包括InputStream) 03. java io系列03之 ByteArrayOutputStream的简介,源码分析和示例(包括Ou

使用 jQuery Mobile 和 CSS3 实现响应式设计

使用 jQuery Mobile 和 CSS3 实现响应式设计 创建可以适应每个用户的屏幕分辨率的 Web 页面布局 jQuery Mobile 框架就其本身而言就是一个优秀的解决方案,可以快速创建一个可访问的由 HTML5 标记驱动的移动网站.当与 CSS3 配合使用时,工作真的会变得很有趣,因为它使创建一个根据屏幕分辨率来响应用户设备的 Web 页面布局成为可能.本文展示了如何使用 jQuery Mobile 框架和 CSS3 媒体查询在您的 Web 页面中实现响应式设计. jQuery M

jQuery + jQuery Mobile 实现省市二级下拉列表页面

一.需求: 提供省.市下拉列表,当用户选择省一级下拉列表项后,市下拉列表的各个选项自动变为该省对应的城市列表. 二.效果: 三.实现: 1.省市json数据,来自: http://www.cnblogs.com/jinzhao/archive/2012/04/01/2428142.html Js代码   /** * 省市json数据 */ var provinceAndCityArray = [{ name: "北京", cities: ["西城", "东