第16章 知问前端--创建header区
学习要点:
1.创建界面
2.引入 UI
一.创建界面
我们首先要设计一个 header,这个区域将要设计成永远置顶。也就是,往下拉出滚动条也永远在页面最上层可视区内。在 header,目前先设计 LOGO、搜索框、按钮、注册和登录即可。
//JS 引入和 CSS 引入 <script type="text/javascript" src="js/jquery.js"></script> <script type="text/javascript" src="js/jquery.ui.js"></script> <script type="text/javascript" src="js/index.js"></script> <link rel="shortcut icon" type="image/x-icon" href="img/favicon.ico" /> <link rel="stylesheet" href="css/smoothness/jquery.ui.css" type="text/css" /> <link rel="stylesheet" href="css/style.css" type="text/css" />
//HTML <div id="header"> <div class="header_main"> <h1>知问</h1> <div class="header_search"> <input type="text" name="search" class="search" /> </div> <div class="header_button"> <input type="button" value="查询" id="search_button" /> </div> <div class="header_member"> <a href="###" id="reg_a">注册</a> | <a href="javascript:void(0)" id="login_a">登录</a> </div> </div> </div> <div id="reg" title="会员注册"> 表单区 </div>
//CSS body { margin:0; padding:0; font-size:12px; margin:40px 0 0 0; background:#fff; } #header { height:40px; width:100%; background:url(../img/header_bg.png); position:absolute; top:0; } #header .header_main { width:800px; height:40px; margin:0 auto; } #header .header_main h1 { height:40px; line-height:40px; font-size:20px; color:#666; margin:0; padding:0 10px; float:left; } #header .header_search { float:left; padding:6px 0 0 0; } #header .header_search .search { width:300px; height:24px; border:1px solid #ccc; background:#fff; font-size:14px; color:#666; text-indent:5px; } #header .header_button { float:left; padding:5px; } #header .header_member { float:right; height:40px; line-height:40px; } #header .header_member a { font-size:14px; text-decoration:none; color:#555555; }
二.引入 UI
在目前的这个 header 区域中,有两个地方使用了 jQuery UI。一个是 button 按钮,一个是 dialog 对话框。
//将 button 按钮设置成 UI $('#search_button').button();
//将 div 设置成 dialog 对话框 $('#reg_a').click(function () { $("#reg").dialog(); });
相关推荐
X-Forwarded-For Header插件,此扩展允许您快速设置X-Forwarded-For HTTP标头
前端开源库-table-header表格标题,将标题添加到文本表格
此扩展允许您快速更新各种 X-Forwarded-For、X-... 打开Chrome浏览器的扩展程序: 地址栏直接输入:chrome://extensions/ 把下载到的文件解压后,点击加载已解压的扩展程序,选择解压后的文件夹(0.6.2_0),安装完毕。
x-forwarded-forheader1.0.1.1.1火狐老插件,可以直接本地安装在旧版火狐上面,可以用的。
前端开源库-connect-header连接头,用于连接的通用头中间件。
前端开源库-auth-headerauth头,用于http
Laravel开发-laravel4-header-csp 提供对使用Laravel4响应中的头强制实施内容安全策略的支持。
前端开源库-eslint-plugin-flow-headereslint插件流头,检查流头注释是否存在。
前端开源库-github-old-headerGithub旧标题,使旧标题链接返回。
vue-json-excel的调整header顺序
Laravel开发-laravel4-header-csp .zip
前端开源库-gulp-headerfooterGulpHeaderFooter,一个用于向文件添加页眉和页脚的Gulp插件
jquery-clone-tableheader table 头部抬头固定 用于 多数据出现滚动条,看不到标题
x143 1template2 el-container class=home-container3 !-- 头部区域 --4 el-header5 div6 img sr.md
bootstrap-table-fixed-header.js bootstrap-table-fixed-header.css 用于实现bootstrap冻结表头
script type =" text/javascript " src =" bower_components/angular-fixed-table-header/src/fixed-table-header.min.js " > </ script > 在应用程序中包含fixed.table.header模块作为依赖项。 angular...
Laravel开发-laravel-json-header 用于将Laravel API组强制到JSON头的中间件
静态文件访问不到报No 'Access-Control-Allow-Origin' header is present on the requested resource处理办法
mint-ui-header示例
@page WordSection1 { /* size: 841.9pt 595.3pt; */ size: 1190.55pt 841.89pt;... mso-header: url('./js/header.htm') h1; } div.WordSection1 { page: WordSection1; }