漂亮的css表单样式,漂亮的css表单样式图片

表格细边框的CSS样式怎么设置?

指定的table为细边框,把table放在div中即可。

创新互联专注于阆中网站建设服务及定制,我们拥有丰富的企业做网站经验。 热诚为您提供阆中营销型网站建设,阆中网站制作、阆中网页设计、阆中网站官网定制、微信小程序开发服务,打造阆中网络公司原创品牌,更为您提供阆中网站排名全网营销落地服务。

一、首先新建表格,代码如下:

table width="500" border="1"  trtdnbsp;/tdtdnbsp;/tdtdnbsp;/td/tr trtdnbsp;/tdtdnbsp;/tdtdnbsp;/td /trtr  tdnbsp;/td tdnbsp;/tdtdnbsp;/td/tr/table。

二、在table里加css样式,代码如下:

table width="500" border="1" cellpadding="0" cellspacing="0" style="border-collapse:collapse;"  tr tdnbsp;/tdtdnbsp;/td tdnbsp;/td /tr tr tdnbsp;/tdtdnbsp;/tdtdnbsp;/td/tr trtdnbsp;/tdtdnbsp;/tdtdnbsp;/td/table。

三、单元格边距(表格填充)(cellpadding) -- 代表单元格外面的一个距离,用于隔开单元格与单元格空间。单元格间距(表格间距)(cellspacing) -- 代表表格边框与单元格补白的距离,也是单元格补白之间的距离,border-collapse:collapse表示表格的两边框合并为一条即可。

html 怎么设置漂亮的表单样式

html 设置漂亮的表单样式,以下是代码:

1、编写一个from表单

form id="payment"

fieldset

legend用户详细资料/legend

ol

li

label for="name"用户名称:/label

input id="name" name="name" type="text" placeholder="请输入用户名" required autofocus

/li

li

label for="email"邮件地址:/label

input id="email" name="email" type="email" placeholder="example@163.com" required

/li

li

label for="phone"联系电话:/label

input id="phone" name="phone" type="tel" placeholder="010-12345678" required

/li

/ol

/fieldset

fieldset

legend家庭住址(收货地址):/legend

ol

li

label for="address"详细地址:/label

textarea id="address" name="address" rows="1" required/textarea

/li

li

label for="postcode"邮政编码:/label

input id="postcode" name="postcode" type="text" required

/li

li

label for="country"国 家:/label

input id="country" name="country" type="text" required

/li

/ol

/fieldset

fieldset

legend付费方式/legend

ol

li

fieldset

legend信用卡类型/legend

ol

li

input id="visa" name="cardtype" type="radio"

label for="visa"中国工商银行/label

/li

li

input id="amex" name="cardtype" type="radio"

label for="amex"中国人民银行/label

/li

li

input id="mastercard" name="cardtype" type="radio"

label for="mastercard"中国建设银行/label

/li

/ol

/fieldset

/li

li

label for="cardnumber"银行卡号:/label

input id="cardnumber" name="cardnumber" type="number" required

/li

li

label for="secure"验 证 码:/label

input id="secure" name="secure" type="number" required

/li

li

label for="namecard"持 卡 人:/label

input id="namecard" name="namecard" type="text" placeholder="确定是否该卡用户!" required

/li

/ol

/fieldset

fieldset

button type="submit"现在购买/button

/fieldset

/form

2、编写css样式

style type="text/css"

/*分别定义HTML中和标记之的距离样式*/

html, body, h1, form, fieldset, legend, ol, li {

margin: 0;

padding: 0;

}

/*定义body标记样式*/

body {

background: #ffffff;

color: #111111;

font-family: Georgia, "Times New Roman", Times, serif;

padding-left: 20px;

}

/*定义付费内容的样式*/

form#payment {

background: #9cbc2c;

-webkit-border-radius: 5px;

border-radius: 5px;

padding: 20px;

width: 400px;

margin:auto;

}

form#payment fieldset {

border: none;

margin-bottom: 10px;

}

form#payment fieldset:last-of-type { margin-bottom: 0; }

form#payment legend {

color: #384313;

font-size: 16px;

font-weight: bold;

padding-bottom: 10px;

text-shadow: 0 1px 1px #c0d576;

}

form#payment fieldset legend:before {

content: "Step " counter(fieldsets) ": ";

counter-increment: fieldsets;

}

form#payment fieldset fieldset legend {

color: #111111;

font-size: 13px;

font-weight: normal;

padding-bottom: 0;

}

form#payment ol li {

background: #b9cf6a;

background: rgba(255, 255, 255, .3);

border-color: #e3ebc3;

border-color: rgba(255, 255, 255, .6);

border-style: solid;

border-width: 2px;

-webkit-border-radius: 5px;

line-height: 30px;

list-style: none;

padding: 5px 10px;

margin-bottom: 2px;

}

form#payment ol ol li {

background: none;

border: none;

float: left;

}

form#payment label {

float: left;

font-size: 13px;

width: 110px;

}

form#payment fieldset fieldset label {

background: none no-repeat left 50%;

line-height: 20px;

padding: 0 0 0 30px;

width: auto;

}

form#payment fieldset fieldset label:hover { cursor: pointer; }

form#payment input:not([type=radio]), form#payment textarea {

background: #ffffff;

border: #FC3 solid 1px;

-webkit-border-radius: 3px;

font: italic 13px Georgia, "Times New Roman", Times, serif;

outline: none;

padding: 5px;

width: 200px;

}

form#payment input:not([type=submit]):focus, form#payment textarea:focus {

background: #eaeaea;

border: #F00 solid 1px;

}

form#payment input[type=radio] {

float: left;

margin-right: 5px;

}

/style

3、漂亮的表单生成。

怎么设置漂亮的表格的样式 css

下面来个例子,你可以复制到你的编辑器里修改测试

style type="text/css"

table.gridtable {}{

font-family: verdana,arial,sans-serif;

font-size:11px;

color:#333333;

border-width: 1px;

border-color: #666666;

border-collapse: collapse;

}

table.gridtable th {}{

border-width: 1px;

padding: 8px;

border-style: solid;

border-color: #666666;

background-color: #dedede;

}

table.gridtable td {}{

border-width: 1px;

padding: 8px;

border-style: solid;

border-color: #666666;

background-color: #ffffff;

}

/style

!-- Table goes in the document BODY --

table class="gridtable"

tr

thInfo Header 1/ththInfo Header 2/ththInfo Header 3/th

/tr

tr

tdText 1A/tdtdText 1B/tdtdText 1C/td

/tr

tr

tdText 2A/tdtdText 2B/tdtdText 2C/td

/tr

/table

CSS(层叠样式表)级联样式表是一种用来表现HTML(标准通用标记语言的一个应用)或XML(标准通用标记语言的一个子集)等文件样式的计算机语言。

好看的CSS字体和表格样式还有文本框样式,好看的加分,100分。复制原码给我

!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" " "

html xmlns=" "

meta http-equiv="Content-Type" content="text/html; charset=utf-8" /

title无标题文档/titlehtml

head

style type="text/css"

!--

.BG {border: 1px solid #FFCC00; br}

.BG1 {border: 1px dashed #CCCCCC; br}

.BG2 {border: 1px inset #3399CC; br}

.BG3 {border-top-width: 1px; brborder-right-width: 1px; brborder-bottom-width: 1px; brborder-left-width: 1px; brborder-top-style: dotted; brborder-right-style: solid; brborder-bottom-style: double; brborder-left-style: outset; brborder-top-color: #999999; brborder-right-color: #FF9900; brborder-bottom-color: #CC9999; brborder-left-color: #99CC00; br}

.BG4 {border-top-width: 1px; brborder-right-width: 1px; brborder-bottom-width: 1px; brborder-left-width: 1px; brborder-top-style: dashed; brborder-right-style: none; brborder-bottom-style: dashed; brborder-left-style: none; brborder-top-color: #FFCC00; brborder-right-color: #FFCC00; brborder-bottom-color: #FFCC00; brborder-left-color: #FFCC00; br}

--

/style

/head

body

table width="300" border="0" cellpadding="0" cellspacing="0" class="BG"

tr

td bgcolor="#FFFF99"div align="center"模拟百度的表格/div/td

/tr

tr

td/td

/tr

/table

p /p

table width="300" border="0" cellpadding="0" cellspacing="0" class="BG1"

tr

td bgcolor="#CCCCCC"div align="center"模拟很多BLOG表格/div/td

/tr

tr

td/td

/tr

/table

p /p

table width="300" border="0" cellpadding="0" cellspacing="0" class="BG2"

tr

tddiv align="center"新款式表格/div/td

/tr

tr

td/td

/tr

/table

p /p

table width="300" border="0" cellpadding="0" cellspacing="0" class="BG3"

tr

tddiv align="center"花式表格/div/td

/tr

tr

td/td

/tr

/table

p /p

table width="300" border="0" cellpadding="0" cellspacing="0" class="BG4"

tr

tddiv align="center"去任意边表格/div/td

/tr

tr

td/td

/tr

/table

p /p

p /p

p /p

/body

/html

整个页面的,复制看看把


当前题目:漂亮的css表单样式,漂亮的css表单样式图片
分享URL:http://csdahua.cn/article/dsdjojp.html
扫二维码与项目经理沟通

我们在微信上24小时期待你的声音

解答本文疑问/技术咨询/运营咨询/技术建议/互联网交流