html笔记05:html、css、javascript综合案例

1.首先是html代码:

<!-- markup time -->
<div class="wrapper wb">

    <div class="black-bar wb-bottom">
        <div class="battery">22% <i class="fa fa-bolt"></i></div>
        <div class="network"><i class="fa fa-signal"></i> AT&amp;T</div>
        <div class="time">12:34 PM</div>
    </div>

    <div class="search-box wb-bottom">
        <form>
            <input type="text" class="search-input wb" placeholder="Search..."/>
            <input type="submit" class="search-button wb" value="Go" />
        </form>
    </div>

    <div class="categories wb-bottom">
        <a class="wb-right">Length</a>
        <a>Category</a>
    </div>

    <div class="search-results">
        <!-- book listing -->
        <div class="search-head wb-bottom">
            <button class="wb">Show all 48 titles</button>
            <h2>Books</h2>
        </div>
        <ul class="wb-child-bottom">
            <li>
                <div class="thumb wb"><i class="fa fa-book"></i></div>
                <a class="book-name">Drift</a>
                <span>By Marlene Gybson</span>
            </li>
            <li>
                <div class="thumb wb"><i class="fa fa-book"></i></div>
                <a class="book-name">What the Nanny...</a>
                <span>By Vivian Bandy</span>
            </li>
        </ul>
        <!-- author listing -->
        <div class="search-head wb-bottom">
            <button class="wb">Show all 6 authors</button>
            <h2>Authors</h2>
        </div>
        <ul class="wb-child-bottom">
            <li>
                <div class="thumb author-thumb wb"><i class="fa fa-user"></i></div>
                <a class="author-name">Carmen A. Maher</a>
            </li>
            <li>
                <div class="thumb author-thumb wb"><i class="fa fa-user"></i></div>
                <a class="author-name">Willie Poon</a>
            </li>
        </ul>
    </div>

</div>

2.其次是css代码:

/*3 custom fonts(handwriting style)*/
@import url(‘http://fonts.googleapis.com/css?family=Delius|Walter+Turncoat|Permanent+Marker‘);
/*fontawesome icon font*/
@import url(‘http://thecodeplayer.com/uploads/fonts/font-awesome-4.1.0/css/font-awesome.min.css‘);

/*basic reset*/
* {margin: 0; padding: 0; box-sizing: border-box;}

/* Apply border image/style/color but not width to:
    1. elements with class attribute containing ‘wb‘
    2. Direct/1st level children of elements with class attr containing ‘wb-child‘
*/
[class*=‘wb‘], [class*=‘wb-child‘] > * {
    /*solid border color(fallback)*/
    border: 0px solid #aaa;
    /*Cloud image sliced at 2px from all sides as border-image*/
    border-image: url(‘http://thecodeplayer.com/u/m/clouds.png‘) 2 stretch;
}
/*border widths*/
/*all sides*/
.wb, .wb-child > * {border-width: 2px;}
/*single sides*/
.wb-top, .wb-child-top > * {border-top-width: 2px;}
.wb-right, .wb-child-right > * {border-right-width: 2px;}
.wb-bottom, .wb-child-bottom > * {border-bottom-width: 2px;}
.wb-left, .wb-child-left > * {border-left-width: 2px;}

/*preventing certain elements from using their default border/bg styles*/
form, input, textarea, table, button, select, optgroup, option {
    font: inherit; color: inherit; background: transparent;
}

/*general styles*/
body {
    font: bold 12px/18px Delius; color: white;
    background: #333;
}
a {
    text-decoration: none; color: white;
    cursor: pointer; /*since all links will be dummy*/
}

.wrapper {width: 320px; margin: 50px auto; border-bottom-width: 0;}

.black-bar {padding: 2px 4px; background: rgba(0, 0, 0, 0.25);}
.battery {float: right;}
.network {float: left;}
.time {text-align: center;}

.search-box {padding: 5px; overflow: hidden;}
.search-input, .search-button {padding: 10px; font-size: 14px; float: left;}
.search-input {width: 70%; margin-right: 2%;}
.search-button { width: 28%; background: rgba(255, 255, 255, 0.15);}

.categories {overflow: hidden; background: rgba(0, 0, 0, 0.35);}
.categories a {
    display: block; float: left; width: 50%; text-align: center;
    font: bold 18px/50px ‘Walter Turncoat‘;
}

.search-head {padding: 10px; background: rgba(0, 0, 0, 0.2);}
.search-head button { float: right; padding: 2px 10px; background: rgba(255, 255, 255, 0.1);}
.search-head h2 {padding: 3px 0; font: normal 18px/20px ‘Permanent Marker‘;}

.search-results li {list-style-type: none; overflow: hidden; padding: 10px;}
.thumb {height: 60px; width: 60px; float: left; margin-right: 10px; text-align: center; background: rgba(0, 0, 0, 0.15);}
.thumb .fa {font-size: 32px; line-height: 60px; opacity: 0.15;}

/*smaller thumbs for authors*/
.author-thumb {width: 32px; height: 32px;}
.author-thumb .fa {font-size: 18px; line-height: 32px; }

.book-name {font: bold 18px ‘Walter Turncoat‘; display: block; margin-top: 7px;}
.author-name {font-size: 14px; line-height: 32px;}

3.最后是javascript代码:

这里没有使用

4.效果图:

时间: 2024-08-30 16:07:46

html笔记05:html、css、javascript综合案例的相关文章

JavaScript:综合案例-表单验证

综合案例:表单验证 开发要求: 要求定义一个雇员信息的增加页面,例如页面名称为"emp_add.htmnl",而后在此页面中要提供有输入表单,此表单定义要求如下: .雇员编号:必须是4位数字,按照正则进行验证: .雇员姓名:不能为空: .雇员职位:不能为空: .雇员日期:按照"yyyy-mm-dd"的格式编写,按照正则进行验证: .基本工资:按照小数编写,小数为最多2位,按照正则进行验证: .佣金:难找小数编写,小数位数最多2位,按照正则进行验证. 具体步骤: 第一

Linux学习笔记——例说makefile 综合案例

0.前言 从学习C语言开始就慢慢开始接触makefile,查阅了很多的makefile的资料但总感觉没有真正掌握makefile,如果自己动手写一个makefile总觉得非常吃力.所以特意借助博客总结makefile的相关知识,通过例子说明makefile的具体用法. 例说makefile大致分为4个部分 1.只有单个C文件 2.含有多个C文件 3.需要包括头文件路径 4.一个较为复杂的例子 [代码仓库]--makefile-example 代码仓库位于bitbucket,可借助Tortoise

Ext.js入门:常用组件与综合案例(七)

一:datefield简单示例 二:timefield简单示例 三:numberfield简单示例 四:FormPanel提交 datefield简单示例: <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title></title> <link href="Ext/resources/css/ext-all.css&

综合案例-整合办公系统后台模块

综合案例-整合办公系统后台模块 1.配置虚拟主机(如www.think.com) 2.配置hosts文件并重启Apache服务器 3.复制ThinkPHP核心文件到项目的目录中(如think目录) 4.创建Zend工程 5.创建index.php入口文件(编写四步走) 6.划分项目前后台模块 设置配置文件(./Application/Common/Conf/config.php) 7.创建Public控制器并定义login方法 编写控制器三步走 8.设置URL调度模式 9.复制模板资源到Publ

网页性能之HTML,CSS,JavaScript

转载自AlloyTeam:http://www.alloyteam.com/2015/05/wang-ye-xing-neng-zhi-html-css-javascript/ 前言 html css javascript可以算是前端必须掌握的东西了,但是我们的浏览器是怎样解析这些东西的呢 我们如何处理html css javascript这些东西来让我们的网页更加合理,在我这里做了一些实验,总结起来给大家看看. 最简单的页面 1 2 3 4 5 6 7 8 9 <!DOCTYPE html>

div+css登陆界面案例

<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <style type="text/css"> body{ margin: 0px; padding:0px; font-size:12px; background-color: #1873aa; text-align: center; overflow: hid

CSS+Javascript的那些框架

CSS CSS 制作框架 SASS http://www.oschina.net/p/sass Blueprint  http://www.oschina.net/p/blueprintcss Elastic CSS布局  http://www.oschina.net/p/elastic CSS 预处理器 Stylus CSS预处理器 http://www.oschina.net/p/stylus LESS  CSS预处理 http://www.oschina.net/p/lesscss Web

韩顺平_轻松搞定网页设计(html+css+javascript)_第34讲_js超级玛丽小游戏

韩顺平_轻松搞定网页设计(html+css+javascript)_第34讲_js超级玛丽小游戏_学习笔记_源代码图解_PPT文档整理 分类: PHP 2012-12-12 15:01 4256人阅读 评论(0) 收藏 举报 文西马龙:http://blog.csdn.net/wenximalong/ 采用面向对象思想设计超级马里奥游戏人物(示意图) 怎么用通过按键,来控制图片的位置 这个小游戏,用面向对象会很方便,不用面向对象会很麻烦很麻烦,比如以后要讲解的坦克大战的游戏,要是用纯的面向过程或

html+css+javascript学习简介

网页设计中最核心的技术:html, css,  javascript 1.html详解 2.Css(块级元素.行内元素.标准流盒子模型.浮动定位) 3.Div+css网页布局(盒子模型经典案例.仿搜狐首页面布局) 4.Javascript深入讲解(js基本语法.数组.js面向对象编程.js系统函数.事件.js dom 编程详解.正则表达式) Web开发:网页设计是web开发的重要组成部分 Php web, java web, .net web 都需要网页设计,实际上web程序的界面,网页的界面