1.input placeholder   文字居中   字体大小+上下padding值等于设计稿宽度 

设计稿中总高度为86px
 


padding:27px 0;font-size:30px;
 
2.英文 文本换行
 
word-break:break-all;
word-wrap:break-word;

3.注意IE下的渐变写法,

引入pie文件之后

-pie-background: linear-gradient(#c9c9c9, #fff);

.nav_box{width:100%;height:50px;position:relative;
background: #ccc;
background: -webkit-linear-gradient(bottom, #c9c9c9, #fff);
background: -moz-linear-gradient(bottom, #c9c9c9, #fff);
background: -o-linear-gradient(bottom, #c9c9c9, #fff);
background: linear-gradient(to top, #c9c9c9, #fff);
-pie-background: linear-gradient(#c9c9c9, #fff);
behavior: url(PIE_uncompressed.htc);

4.表格代码片段

html:

<div class="level_score_table">
<table>
<thead>
<tr>
<td class="w150 table_left_title table_color01">信用等级</td>
<td class="w110 table_color02">A</td>
<td class="w110 table_color03">B</td>
<td class="w110 table_color04">C</td>
<td class="w110 table_color05">D</td>
<td class="w110 table_color06">E</td>
</tr>
</thead>
<tbody>
<tr>
<td class="table_left_title">信用分数</td>
<td>31-60分</td>
<td>31-60分</td>
<td>31-60分</td>
<td>31-60分</td>
<td>0-30分</td>
</tr>
</tbody>
</table>
</div>

  

.level_score_table{width: 704px;background: #dcdcdc;margin: 0 auto;
& table{border-collapse: separate;
border-spacing: 1px;
& thead tr{background:#f47908;& td{color: #FFF !important;}}
& tbody tr{background:#ffffff;& td{color: #333333;}}
& tr{background:#ffffff;
& td{border-spacing: 1px;text-align: center;color: #f1740f;padding: 18px 0px;font-size: 20px;}
}
}
}
.w150{width: 150px;}
.w110{width: 110px;} .table_left_title{font-family: $yahei;font-size: 18px;}
.table_color01{background: #f47908;}
.table_color02{background: #f47908;}
.table_color03{background: #f68721;}
.table_color04{background: #fc993e;}
.table_color05{background: #fda656;}
.table_color06{background: #ffba7b;}

单元格合并

当需要合并单元格,即有的元素占用两行,有的元素占用两列。这时,用到了以下属性:

rowspan占n列

colspan占n行

<div class="level_score_table02">
<table>
<thead>
<tr>
<td class="w185 table_left_title "></td>
<td class="w310 table_left_title">项 目</td>
<td class="w84 table_left_title">状 态</td>
<td class="w125 table_left_title">信用分数</td>
</tr>
</thead>
<tbody>
<tr>
<td class="table_left_title" rowspan="3">基本信息</td>
<td>31-60分</td>
<td>31-60分</td>
<td>31-60分</td>
</tr>
<tr>
<td>31-60分</td>
<td>31-60分</td>
<td>31-60分</td>
</tr>
<tr>
<td>31-60分</td>
<td>31-60分</td>
<td>31-60分</td>
</tr>
<tr>
<td class="table_left_title" rowspan="3">基本信息</td>
<td>31-60分</td>
<td>31-60分</td>
<td>31-60分</td>
</tr>
<tr>
<td>31-60分</td>
<td>31-60分</td>
<td>31-60分</td>
</tr>
<tr>
<td>31-60分</td>
<td>31-60分</td>
<td>31-60分</td>
</tr>
</tbody>
</table>
</div>
.level_score_table02{width: 704px;background: #dcdcdc;margin: 0 auto;border-radius: 2px;
& table{border-collapse: separate;
border-spacing: 1px;
& thead tr{background:#f3f3f3;& td{color: #333333 !important;}}
& tbody tr{background:#ffffff;& td{color: #333333;}}
& tr{
& td{border-spacing: 1px;text-align: center;color: #f1740f;padding: 18px 0px;font-size: 20px;}
}
}
}

5.选择下拉框

默认系统select

<div class="loan_list_select w153">
<select name="listZhiwei1" size="1">北京</select>
</div>

css:

.loan_list_select{width: 620px;height: 40px;font-size: 17px;color: #343434;float: left;position: relative;}
.loan_list_select select{ width: 100%; height: 40px;color: #333;line-height: 1.5;padding: 10px 0 ;font-size: 16px;}
效果:
IE下

谷歌浏览器下 

div标签模拟
<div class="select_box province">
<div class="selected">1000元</div>
<img src="data:images/loan/list_icon02.png" class="select_arrow" />
<div class="select_list_box" style="display:none;">
<div class="select_list">1000元</div>
<div class="select_list">2000元</div>
<div class="select_list">3000元</div>
<div class="select_list">4000元</div>
<div class="select_list">5000元</div>
</div>
</div>
// 模拟select
.select_box{width:100%;height:40px;position:absolute;left:0px;top:0px;cursor:pointer;z-index:;border: 1px solid #d5d5d5;behavior: url(PIE_uncompressed.htc);border-radius:3px ;}//注意宽度设置为100%,继承父元素的宽度
.select_box .selected{width:80%;height:40px;line-height:40px;font-size:17px;text-indent:18px;color: #343434;overflow: hidden;}//注意宽度设置为80%,并且overflow: hidden;保证文字太多不会与后面箭头重叠
.select_list_box{width:100%;/*height:150px;*//*overflow:hidden;overflow-y:scroll;*/background:#d5d5d5;}//注意1.宽度设置为100%,继承父元素的宽度。2.如果有内容太多可以放开滚动
.select_list_box .select_list{width:100%;height:40px;font-size:17px;line-height:40px;text-indent:18px;border-top:1px solid #f5f5f5;color: #FFF;}//注意宽度设置为100%,继承父元素的宽度
.select_list_box .select_list:hover{background:#c9c9c9;}
.select_arrow{position: absolute;right: 0px;top:0px;cursor: pointer;} .z_index6{z-index:;}
.z_index5{z-index:;}
.z_index4{z-index:;}
.z_index3{z-index:;}
.z_index2{z-index:;}
.z_index1{z-index:}

其他常用HTML 片段的更多相关文章

  1. C#常用代码片段备忘

    以下是从visual studio中整理出来的常用代码片段,以作备忘 快捷键: eh 用途: 类中事件实现函数模板 private void MyMethod(object sender, Event ...

  2. 36个Android开发常用代码片段

    //36个Android开发常用代码片段 //拨打电话 public static void call(Context context, String phoneNumber) { context.s ...

  3. Jquery学习总结(1)——Jquery常用代码片段汇总

    1. 禁止右键点击 ? 1 2 3 4 5 $(document).ready(function(){     $(document).bind("contextmenu",fun ...

  4. jQuery常用代码片段

    检测IE浏览器 在进行CSS设计时,IE浏览器对开发者及设计师而言无疑是个麻烦.尽管IE6的黑暗时代已经过去,IE浏览器家族的人气亦在不断下滑,但我们仍然有必要对其进行检测.当然,以下片段亦可用于检测 ...

  5. Ext.NET Ext.JS 常用代码片段摘录

    引言 最近写代码突然有"一把梭"的感觉, 不管三七二十一先弄上再说. 换别人的说法, 这应该是属于"做项目"风格法吧. 至于知识体系, 可以参考官方或者更权威的 ...

  6. python常用代码片段

    目录 Python3常用 文件处理 json处理 log日志 argparse使用 INIparser Python3常用 文件处理 class BaseMethod: @staticmethod d ...

  7. Vue3.0常用代码片段和开发插件

    Vue3 Snippets for Visual Studio Code Vue3 Snippets源码 Vue3 Snippets下载 This extension adds Vue3 Code S ...

  8. Play常用代码片段 http://www.anool.net/?p=625

    持续更新中: (1)按照降序查询: List<Entity> entities= Entity.find("order by id desc").fetch(2);   ...

  9. Android开发常用代码片段

    拨打电话 public static void call(Context context, String phoneNumber) { context.startActivity( new Inten ...

随机推荐

  1. POJ1845 Sumdiv(求所有因数和+矩阵快速幂)

    题目问$A^B$的所有因数和. 根据唯一分解定理将A进行因式分解可得:A = p1^a1 * p2^a2 * p3^a3 * pn^an.A^B=p1^(a1*B)*p2^(a2*B)*...*pn^ ...

  2. 转载关于KeyPress和KeyDown事件的区别和联系

    KeyDown:在控件有焦点的情况下按下键时发生. KeyPress:在控件有焦点的情况下按下键时发生. KeyUp:在控件有焦点的情况下释放键时发生. 1.KeyPress主要用来接收字母.数字等A ...

  3. tableviewCell折叠状态3

    // //  LHQDelegateModel.h //  11 - 投资管理 - 李洪强 // //  Created by vic fan on 16/4/13. //  Copyright © ...

  4. Add SSH Key to GitLab on Windows

    Download Git for windows Open Git Bash Type in "ssh-keygen -t rsa", and then press Enter b ...

  5. hdu Collect More Jewels

    思路: 先用bfs求出入口,宝物,出口,两两之间的最短距离. 在用dfs搜索所有情况,求出从入口走到出口能获得的最大价值. 我们要解决几个问题:1.求入口到第一个取宝物的地方的最短距离 2.求第i个取 ...

  6. 记一本关于thinkphp&&MVC的好书

    看过好多书,写thinkphp就蜻蜓点水般,而且语言比较书面.看到了李开涌写的php mvc开发实战.他本人是技术方面的专家,写的书结合了对技术的理解.我读起来感觉收获颇多.比如model这块,我一直 ...

  7. LINQ Count/Sum/Min/Max/Avg

    参考:http://www.cnblogs.com/peida/archive/2008/08/11/1263384.html Count/Sum/Min/Max/Avg用于统计数据,比如统计一些数据 ...

  8. 当前标识(NT AUTHORITY\NETWORK SERVICE)没有对“C:\WINDOWS\Microsoft.NET\Frame

    异常详细信息: System.Web.HttpException: 当前标识(NT AUTHORITY\NETWORK SERVICE)没有对“C:\WINDOWS\Microsoft.NET\Fra ...

  9. HDU 1394 Minimum Inversion Number(线段树/树状数组求逆序数)

    Minimum Inversion Number Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java ...

  10. 【转】我们应该如何去了解JavaScript引擎的工作原理

    原文地址:http://www.nowamagic.net/librarys/veda/detail/1579 昨天收到一封来自深圳的一位前端童鞋的邮件,邮件内容如下(很抱歉,未经过他的允许,公开邮件 ...