背景偏移与定位
[php]repeat : 默认值 背景图像在纵向和横向上平铺
no-repeat : 背景图像不平铺
background-position: top left;
background-position: 0px 0px;
background-position: 0% 0%;百分比
横向合并
colspan 纵向合并rowspan
border-spacing:边框间距
border-collapse:合并边框
背景属性
background-color 使用的背景颜色
background-image 使用的背景图像
background-repeat 如何重复背景图像
background-attachment 背景图像是否固定或者随着页面的其余部分滚动
background-position 背景图像的位置
.example { background: aquamarine url(img.png)
no-repeat scroll center center / 50% content-box content-box; }
<!DOCTYPE html><html lang="en"><head>
<meta charset="UTF-8"><title>CSS背景属性简写</title><style type="text/css"> body{
background: red url("1.jpg") no-repeat 20px 50px scroll } </style></head><body>
</body></html>
表单
<form> 元素
HTML 表单用于收集用户输入。
<form> 元素定义 HTML 表单:
<form>
.
form elements
.
</form>
表单元素指的是不同类型的 input 元素、复选框、单选按钮、提交按钮
<input> 元素
<input> 元素是最重要的表单元素。
<input> 元素有很多形态,根据不同的 type 属性。
这是本章中使用的类型:
类型
描述
text
定义常规文本输入。
radio
定义单选按钮输入(选择多个选择之一)
submit
定义提交按钮(提交表单)
文本输入
<input type="text"> 定义用于文本输入的单行输入字段:
<form>
First name:
<input type="text" name="firstname">
Last name:
<input type="text" name="lastname">
</form>
单选按钮输入
<input type="radio"> 定义单选按钮。
单选按钮允许用户在有限数量的选项中选择其中之一:
列如
<form>
<input type="radio" name="sex" value="male" checked>Male
<input type="radio" name="sex" value="female">Female
</form>
提交按钮
<input type="submit"> 定义用于向表单处理程序(form-handler)提交表单的按钮。
表单处理程序通常是包含用来处理输入数据的脚本的服务器页面。
表单处理程序在表单的 action 属性中指定:
列如
<form action="action_page.php">
First name:
<input type="text" name="firstname" value="Mickey">
Last name:
<input type="text" name="lastname" value="Mouse">
<input type="submit" value="Submit">
</form>