作为一个后台开发人员而言,拥有一套属于自己的前台样式是比较重要的,这里分享一下自己感觉还不错的样式,以后遇到好的,还会陆续添加

上图:

带鼠标滑动效果的table样式看起来比较清爽

样式

<head runat="server">
<title></title>
<script src="../Scripts/jquery-1.4.1.min.js" type="text/javascript"></script>
<style type="text/css">
.t1
{
clear: both;
border: 1px solid #c9dae4;
}
.t1 tr th
{
color: #0d487b;
background: #f2f4f8 url(../CSS/Table/images/sj_title_pp.jpg) repeat-x left bottom;
line-height: 28px;
border-bottom: 1px solid #9cb6cf;
border-top: 1px solid #e9edf3;
font-weight: normal;
text-shadow: #e6ecf3 1px 1px 0px;
padding-left: 5px;
padding-right: 5px;
}
.t1 tr td
{
border-bottom: 1px solid #e9e9e9;
padding-bottom: 5px;
padding-top: 5px;
color: #444;
border-top: 1px solid #FFFFFF;
padding-left: 5px;
padding-right: 5px;
word-break: break-all;
}
/* white-space:nowrap; text-overflow:ellipsis; */
tr.alt td
{
background: #ecf6fc; /*这行将给所有的tr加上背景色*/
}
tr.over td
{
background: #bcd4ec; /*这个将是鼠标高亮行的背景色*/
}
</style>
<script type="text/javascript">
$(document).ready(function () { //这个就是传说的ready
$(".t1 tr").mouseover(function () {
//如果鼠标移到class为stripe的表格的tr上时,执行函数
$(this).addClass("over");
}).mouseout(function () {
//给这行添加class值为over,并且当鼠标一出该行时执行函数
$(this).removeClass("over");
}) //移除该行的class
$(".t1 tr:even").addClass("alt");
//给class为stripe的表格的偶数行添加class值为alt
});
</script>
</head>
<body>
<form id="form1" runat="server"> <table width="100%" id="ListArea" border="0" class="t1" align="center" cellpadding="0"
cellspacing="0">
<tr align="center">
<th>
编号
</th>
<th>
名称
</th>
<th>
人数
</th>
<th>
任务
</th>
<th>
职能
</th>
</tr>
<tr align="center">
<td>
1234
</td>
<td>
aaaa
</td>
<td>
aaaaa
</td>
<td>
aaaaa
</td>
<td>
aaaaa
</td>
</tr>
<tr align="center">
<td>
1234
</td>
<td>
aaaa
</td>
<td>
aaaaa
</td>
<td>
aaaaa
</td>
<td>
aaaaa
</td>
</tr>
<tr align="center">
<td>
1234
</td>
<td>
aaaa
</td>
<td>
aaaaa
</td>
<td>
aaaaa
</td>
<td>
aaaaa
</td>
</tr>
<tr align="center">
<td>
1234
</td>
<td>
aaaa
</td>
<td>
aaaaa
</td>
<td>
aaaaa
</td>
<td>
aaaaa
</td>
</tr>
<tr align="center">
<td>
1234
</td>
<td>
aaaa
</td>
<td>
aaaaa
</td>
<td>
aaaaa
</td>
<td>
aaaaa
</td>
</tr>
<tr align="center">
<td>
1234
</td>
<td>
aaaa
</td>
<td>
aaaaa
</td>
<td>
aaaaa
</td>
<td>
aaaaa
</td>
</tr>
</table>
</form>
</body>

表单图片

样式:

/*表单样式*/
.f1{ float:left; width:100%;} .t2 { clear:both; /*border-collapse: collapse;*/ border: 1px solid #c9dae4; }
.t2 tr th { color:#000; padding: 5px 0px 5px 10px; border-bottom: 1px solid #e6e6e6; font-weight: normal; background: #f7fafc; text-align:left; border-right: 1px solid #e6e6e6; border-left: 1px solid #e6e6e6; }
.t2 tr td{ border-bottom: 1px solid #e6e6e6; padding: 5px 0px 5px 10px; line-height:22px; word-break:break-all;}
.t2 tr th em, .t2 tr td em{ font-weight:bold; color:Red;}

还不错的Table样式和form表单样式的更多相关文章

  1. element-ui的form表单样式改动

    造成下面样式错乱是下面自带的css样式,原本打算通过样式重写在组件内的style,发现下面相应的元素是出于封装情况的,无论样式重写在组件还是在公共样式均不能很好的解决,因为跳转到该页面时都要刷新一次, ...

  2. yii2的form表单样式怎么灵活控制呢?

    <?php $form = ActiveForm::begin(['id' => 'login-form', 'fieldConfig'=>[ 'template'=> &qu ...

  3. css form表单样式清除

    开发项目中表单常用的清楚样式: 1.改变placeholder默认字体颜色 ::-webkit-input-placeholder{color: #333;} :-moz-placeholder{co ...

  4. form表单样式

    <BODY> <div id="modify-data"> <form class="modify-data-form"> ...

  5. bootstrap简单form表单样式-form-horizontal

    jsp代码: <div id="content" style="background-color: white;"> <form class= ...

  6. Ajax提交Form表单及文件上传

    刚刚申请下来的博客,写得第一篇.有点小激动,本人以前是一名工业3D设计师突然有些变故做上了JavaWeb开发: 前几天,发现了一些小问题.我在写后台管理页面时,需要上传一张图片.于是我就用很普通的Fo ...

  7. Django的Form表单验证

    Form(from django import forms) 简短理解:后端提供了一个类:from django import forms,继承此类定义子类.子类中定义和form表单中提交到name名 ...

  8. HTML之表格标签和form表单

    表格标签: table 一般用于信息展示 tr行 td文本单元格 th标题单元格(文本加粗) table属性: cellspacing:单元格间距,一般设置为0 cellpadding:文字到边框的距 ...

  9. vue3 element-plus 配置json快速生成form表单组件,提升生产力近600%(已在公司使用,持续优化中)

    ️本文为博客园社区首发文章,未获授权禁止转载 大家好,我是aehyok,一个住在深圳城市的佛系码农‍♀️,如果你喜欢我的文章,可以通过点赞帮我聚集灵力️. 个人github仓库地址: https:gi ...

随机推荐

  1. IDAE快捷键与设置

    以前做项目的时候都是用Eclispe,来到新的公司发现IDE用的是IDEA集成开发工具,以前也用过IDEA,只是略懂略懂,以后你会发现,当你用IDEA的快捷键的时候,会6的飞起 1.IDEA常用快捷键 ...

  2. MATLAB应用专题part2-电力电子仿真技术

    有匪君子,如切如磋,如琢如磨. --<诗经·卫风·淇奥> 这篇博客知识我记录一下我在仿真学习中积累到的知识和遇到的坑. 第一部分:知识部分 1.为什么电阻与电感串联电路中电流的波形比电压的 ...

  3. 逻辑卷管理(LVM)-快照

    1.需要在逻辑卷相同的卷组中创建逻辑卷快照.-s :表示快照  -p r:表示只读  /dev/vg0/mysql 为那个卷的快照 2.查看快照卷信息. 3.快照恢复,必须先取消挂载,还原成功之后,快 ...

  4. 纪中21日T3 2118. 【2016-12-30普及组模拟】最大公约数

    纪中21日T3 2118. 最大公约数 (File IO): input:gcd.in output:gcd.out 时间限制: 1000 ms  空间限制: 262144 KB  具体限制 Goto ...

  5. 纪中10日T1 2313. 动态仙人掌

    纪中10日 2313. 动态仙人掌 (File IO): input:dinosaur.in output:dinosaur.out 时间限制: 1500 ms  空间限制: 524288 KB  具 ...

  6. .NET MVC强类型参数排除和包含

    MVC接收强类型对象时排除或只接收某几个属性使用Bind特性 只接收几个属性:Bind(Include="属性1,属性2,属性3,...") 排除某几个属性:Bind(Exclud ...

  7. PTA甲级B1061 Dating

    目录 B1061 Dating (20分) 题目原文 Input Specification: Output Specification: Sample Input: Sample Output: 生 ...

  8. 论文阅读笔记(二十二)【CVPR2017】:See the Forest for the Trees: Joint Spatial and Temporal Recurrent Neural Networks for Video-based Person Re-identification

    Introduction 在视频序列中,有些帧由于被严重遮挡,需要被尽可能的“忽略”掉,因此本文提出了时间注意力模型(temporal attention model,TAM),注重于更有相关性的帧. ...

  9. 判定PDF文件是否能够正常打开

    下载iTextSharp.dll using iTextSharp.text.pdf; PdfReader reader = new PdfReader(strPath + "\\" ...

  10. 3个N加上各种运算符号结果等于6(纯属娱乐)C#

    网上的题目: 题有点难  但都有解 2    2    2  =  6 3    3    3  =  6 4    4    4  =  6 5    5    5  =  6 6    6     ...