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. sql 关联查询

    SELECT mms_sample_datas.* from mms_sample_datas where mms_sample_datas.mms_id in ( SELECT mms_sample ...

  2. BZOJ3790 : 神奇项链

    Manacher求出所有极长回文子串后,得到一堆线段,转化成线段覆盖问题 预处理出g[i]表示左端点不超过i的右端点的最大值 贪心地线段覆盖即可 时间复杂度$O(n)$ #include<cst ...

  3. SVN标准命令

    SVN标准命令 范例 checkout 检出 svn  co  URL 检出app/search/news/apache/主干上最新版本到本地工作副本,可执行命令: svn co  https://s ...

  4. RSA密钥的生成与配置

    openssl下载地址http://dldx.csdn.net/fd.php?i=20313208579480&s=ac2e809e168f7d5b8bf1515d3d6b1aa4,或者官方下 ...

  5. checking在浏览器为应用缓存查找更新时触发

    离线的Web应用,就是在设备不能上网的时候还能运行应用.html5把离线应用作为重点,主要是开发人员的心愿.离线应用的开发的步骤有:首先应该知道设备是否能够上网;然后应该还能访问一定的资源(如图像.C ...

  6. java 找出字符串之间的字符

    package lia.meetlucene; import java.io.IOException; import java.util.ArrayList; import java.util.Arr ...

  7. 什么是java 键值对

    所谓键值对,你可以查看jdk文档,找MAP接口,它的实现类都是键值对的形式保存数据的 键:就是你存的值的编号值:就是你要存放的数据

  8. 离线更新SEPM服务器的病毒定义库

    1. 从http://www.symantec.com/security_response/definitions/download/detail.jsp?gid=sep下载JDB文件    2. 将 ...

  9. NBOJv2 1022 短信篮球(种类并查集)

    Problem 1022: 短信篮球 Time Limits:  1000 MS   Memory Limits:  65536 KB 64-bit interger IO format:  %lld ...

  10. php一些技巧函数

    current() next() prev() 范例 <?php $people = array("Peter", "Joe", "Glenn& ...