HTML表格CSS美化
效果展示
style.css
html{
width: 100%;
height: 100%;
overflow: hidden;
}
body{
width: 100%;
height: 100%;
font-family: 'Open Sans',sans-serif;
margin: 0;
background-color: rgb(230, 189, 189);
}
#login{
position: absolute;
top: 40%;
left:50%;
margin: -150px 0 0 -150px;
width: 300px;
height: 300px;
}
#login h1{
color: #fff;
text-shadow:0 0 10px;
letter-spacing: 1px;
text-align: center;
}
h1{
font-size: 2em;
margin: 0.67em 0;
}
input{
width: 278px;
height: 18px;
margin-bottom: 10px;
outline: none;
padding: 10px;
font-size: 13px;
color: #fff;
text-shadow:1px 1px 1px;
border: 1px solid rgb(230, 189, 189);
border-radius: 4px;
background-color: rgb(177, 106, 104);
}
.but{
width: 300px;
min-height: 20px;
display: block;
background-color: rgb(230, 189, 189);
border: 1px solid #ffffff;
color: #b26b69;
padding: 9px 14px;
font-size: 15px;
line-height: normal;
border-radius: 5px;
margin: 0;
}
#div1{
position:fixed;
left:0px;
right:0px;
width:800px;
margin-left:auto;
margin-right:auto;top:100px;
}
#div1 h1{
color: #fff;
text-shadow:0 0 10px;
letter-spacing: 1px;
text-align: center;
}
#div1 div{
height:50px;
}
#div1 a{
height:30px;
font-size: 20px;
color: rgb(255, 255, 255);
text-shadow:0 0 10px;
letter-spacing: 1px;
text-align: center;
}
#a {
height:50px;
border:1px solid rgb(230, 189, 189);
}
#a input {
height:30px;
border: 1px solid rgb(230, 189, 189);
background-color: lavenderblush;
}
label{
display: inline-block;
padding: 3px 6px;
text-align: right;
width: 100px;
vertical-align: top;
text-align:right
}
.txt{
color: #fff;
height:30px;
width: 40px;
font-size: 15px;
text-shadow:0 0 9px;
letter-spacing: 1px;
text-align: center;
}
table {
width: 90%;
background: #b26b69;
margin: 10px auto;
border-collapse: collapse;/*border-collapse:collapse合并内外边距(去除表格单元格默认的2个像素内外边距*/
}
th,td {
height: 25px;
line-height: 25px;
text-align: center;
border: 1px solid #000000;
}
th {
background: #b26b69;
font-weight: normal;
}
tr {
background: rgb(230, 189, 189);
}
tr:hover {
background: #fcb99f;
}
td a {
color: rgb(0, 0, 0);
text-decoration: none;
}
td a:hover {
color: rgb(0, 0, 0);
text-decoration: underline;
}
look.jsp
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>图书列表</title>
<link rel="stylesheet" type="text/css" href="style.css"/>
</head>
<body>
<div align="center" id="div1">
<h1>图书列表</h1>
<table class="tb">
<tr>
<th>编号</th>
<th>书名</th>
<th>作者</th>
<th>出版社</th>
<th>可借阅数</th>
</tr>
<!-- forEach遍历出adminBeans -->
<c:forEach items="${books}" var="item" varStatus="status">
<tr>
<!--<td><a href="BillServlet?method=getbillbyidcard3&idcard="> </a></td>-->
<td>${item.bid}</td>
<td>${item.bname}</td>
<td>${item.bwriter}</td>
<td>${item.bout}</td>
<td>${item.bnum}</td>
</tr>
</c:forEach>
</table>
<a href="teacher.jsp">返回主页</a>
</div>
</body>
</html>
HTML表格CSS美化的更多相关文章
- 学习笔记 第九章 使用CSS美化表格
第9章 使用CSS美化表格 学习重点 正确使用表格标签: 设置表格和单元格属性: 设计表格的CSS样式. 9.1 表格的基本结构 表格由行.列.单元格3部分组成,单元格时行与列交叉的部分. 在HTM ...
- html table 美化-html如何用css美化表格
html用css美化表格的方法:首先创建一个HTML示例文件:然后在body中创建table表格:最后通过style标签给表格添加css样式即可. 代码 下面通过示例来看看. /*表格样式*/ tab ...
- 只用CSS美化选择框
只用CSS美化选择框 2012-03-02 11:04 by iBlog, 26240 阅读, 14 评论, 收藏, 编辑 <本文译自Style a Select Box Using Only ...
- CSS美化页面滚动条
文章来自:http://www.webhek.com/scrollbar 本文将会告诉你如何用CSS修改/美化浏览器页面上出现的滚动条.改变它们的颜色,调整它们的外形,适配你对页面UI设计.我们首先将 ...
- css美化页面
css美化页面 如果在我们一行文字中,想让某个文字凸显出来,使用span! 1.字体样式 font-style:字体的风格 italic normal font-weight:字体的粗细 normal ...
- CSS美化自己的完美网页
CSS美化自己的完美网页 CSS概述 css样式: css是英文Cascading Style Sheets的缩写,称为层叠样式表,用于对页面进行美化,CSS的可以使页面更加的美观.基本上所有的h ...
- 跟着辛星一起用CSS美化商品列表
说实话,近期对CSS的关注还是蛮多的,不为别的,仅仅是由于自己喜欢,感觉写CSS就像画家绘画一样,使用热情和激情去探索,没有了那份功利心,反而感觉是一种享受.特别有成就感,好啦,今天就分享一期自己用C ...
- 学习笔记 第十章 使用CSS美化表单
第10章 使用CSS美化表单 [学习重点] 正确使用各种表单控件 熟悉HTML5新增的表单控件 掌握表单属性的设置 设计易用性表单页面 10.1 表单的基本结构 表单包含多个标签,由很多控件组成 ...
- 学习笔记 第八章 使用CSS美化列表
第8章 使用CSS美化列表 8.1 列表的基本结构 在HTML中,列表结构可以分为两种基本类型:有序列表和无序列表.使用标签如下: <ul>...</ul>:标识无序列表: ...
随机推荐
- 『德不孤』Pytest框架 — 9、Pytest测试报告
目录 1.pytest-html插件 2.Allure测试报告 (1)Allure框架说明 (2)Allure框架的使用 1.pytest-html插件 Pytest可以通过命令行方式,生成xml/h ...
- [USACO20FEB]Equilateral Triangles P 题解
优雅的暴力. 设三个点为 \((i,j,k)\),则有 \(6\) 个未知数即 \(x_i,x_j,x_k,y_i,y_j,y_k\).又因为有 \(2\) 条关于这 \(6\) 个未知数的方程 \( ...
- Lua中如何实现类似gdb的断点调试—06断点行号检查与自动修正
前面两篇我们对性能做了一个优化,接下来继续来丰富调试器的特性. 我们前面提到过,函数内并不是所有行都是有效行,空行和注释行就不是有效行.我们之前在添加断点的时候,并没有对行号进行检查,任何行号都能成功 ...
- 采用 DIV+CSS 布局网页练习
实验四:采用 DIV+CSS 布局网页练习 实验目的: 熟悉 DIV+CSS 布局网页的方法 实验要求: 1.制作一个完整网页和一个 css 文件: 2.在网页中采用 DIV+CSS 布局 4 个以上 ...
- Applied-Social-Network-Analysis-in-Python 相关笔记4
模型数据越多,Average系数就越小. perferential attachment model 有比较小的平均路径长度,但有着小的cc. rewire:重新连接 如果仅看这个共同的邻居数的话,数 ...
- 打靶笔记-03-vulhub-Moriarty Corp
打靶笔记-03-vulhub-BoredHackerBlog 一.靶机信息 Name: BoredHackerBlog: Moriarty Corp(中-高级难度) Date release: 29 ...
- 【面经】Python面试的16个高频问题
(一)Python 是如何进行内存管理的? 答:从三个方面来说,一对象的引用计数机制,二垃圾回收机制,三内存池机制 ⒈对象的引用计数机制 Python 内部使用引用计数,来保持追踪内存中的对象,所有对 ...
- Python:用pyinstrument做性能分析
导引 在计算密集型计算或一些Web应用中,我们常常需要对代码做性能分析.在Python中,最原始的方法即是使用time包中的time函数(该函数以秒为计时单位): from time import s ...
- mysql优化参数 (汇总)
1 如下为128G内存32线程处理器的mariadb配置参数优化: [client]#password= your_passwordport= 3306 socket= /tmp/mysql.sock ...
- GeneralUpdate20220323里程碑版本发布
大家好我是juster,GeneralUpdate的开源项目作者.这次将发布GeneralUpdate里程碑版本,该版本发生了巨大改变历时4个月的时间终于要和大家见面了.开源不易希望大家能多多支持.可 ...