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. BZOJ3742 : Painting

    设f[i][j]表示以i为根的子树,i与父亲之间的边染成j的最小代价 DP的过程中转移时相当于求一个最小权匹配,用费用流即可 感觉复杂度飞起来了… #include<cstdio> con ...

  2. Zepto源码注释

    /* Zepto v1.0-1-ga3cab6c - polyfill zepto detect event ajax form fx - zeptojs.com/license */ ;(funct ...

  3. Grunt配置文件编写技巧及示范

    受益于grunt这么久,继续分享关于grunt的一些技巧.grunt确实是前端项目中不可或缺的提升效率的工具.第一次接触grunt是在去年7月份,开始有接触LESS.Coffee Script的等需要 ...

  4. BZOJ3513: [MUTC2013]idiots

    Description 给定n个长度分别为a_i的木棒,问随机选择3个木棒能够拼成三角形的概率. Input 第一行T(T<=100),表示数据组数.接下来若干行描述T组数据,每组数据第一行是n ...

  5. QMessageBox 使用方法

    在Qt中经常需要弹出窗口,QMessageBox可以实现此功能,一共有三种窗口,information, question, 和 warning,critical, about分别对应感叹号,问号和叉 ...

  6. Redis Cluster 3.0搭建与使用

    Redis Cluster终于出了Stable,这让人很是激动,等Stable很久了,所以还是先玩玩. 一. 集群简单概念. Redis 集群是一个可以在多个 Redis 节点之间进行数据共享的设施( ...

  7. HP StorageWorks MSL2024 Tape Libraries - Robotic Error Sub-Codes

    Robotic error sub-codes Mechanical initialization failure 02 Connection to slave robotic failed 03 E ...

  8. 【iBoard电子学堂】【iCore双核心板】资料光盘A盘更新,版本号为A6

    _____________________________________ 深入交流QQ群: A: 204255896(1000人超级群,可加入) B: 165201798(500人超级群,满员) C ...

  9. 分布式架构高可用架构篇_02_activemq高可用集群(zookeeper+leveldb)安装、配置、高可用测试

    参考: 龙果学院http://www.roncoo.com/share.html?hamc=hLPG8QsaaWVOl2Z76wpJHp3JBbZZF%2Bywm5vEfPp9LbLkAjAnB%2B ...

  10. eclipse安装swing插件

    最近想用java做个小应用,是那种可视化图形类的应用.因为一直比较懒,所以打算用swt拖拖拽拽.于是在就去找swt,这是以前的办法.结果发现原来最新版的eclipse自己带有一个windowbuild ...