html5標籤css3的常用樣式,html5標籤css3

來源:互聯網
上載者:User

html5標籤css3的常用樣式,html5標籤css3

<meta name=''>

name:有如下6個值:
application-name:文檔名或者應用程式名稱,整個文檔只能包含一個值。
author:文檔作者
description:文檔描述
generator:產生文檔的程式。
keywords:網頁關鍵字,用英文逗號分隔。

 

<a href="http://www.baidu.com">百度一下</a>

href:路徑
<img src="../img/a.jpg" alt="此圖無法顯示" border="1px solid red" width="400" height="250"/>
src:圖片路徑

<table>標籤的屬性
Border 邊框
Cellspacing 表格外邊距
Cellpadding 表格內邊距
Align  位置
Bgcolor:背景色
Background:背景圖片
Bordercolor:邊框顏色

table中 <tr></tr>

<td colspan="2"></td>  colspan 跨2列

        rowspan  跨  行

<input type="">

 type值

text  文本

password 密碼

radio 單選

checkbox 多選

reset 重設

file 檔案上傳

submit 提交表單

image 圖形提交

button 普通按鈕

分組下拉

<select name="city" id="city">
<optgroup label="山東">
<option value="yt">煙台</option>
<option value="qd">青島</option>
<option value="wh">威海</option>
</optgroup>
<optgroup label="北京">
<option value="bj">bj</option>
<option value="tam">tam</option>
<option value="zong">zong</option>
</optgroup>
</select>

文字地區textarea
<textarea name="textarea" id="textarea" cols="30" rows="10" readonly="readonly"
disabled="disabled">
1</textarea>
cols 寬度 rows 高度 readonly 唯讀

css樣式

字型、字型大小:
font(縮寫形式)
font-weight(粗細) 正常(normal) 粗體(bold) 斜體(italic)
font-size(大小)
font-family(字型系列)
font-style(字型樣式)


字型顏色:
color
opacity (透明度 css3)


行距、對齊等:
line-height (行高)
text-align (對齊)
letter-spacing (字元間距)
text-decoration (文本修飾 )
overflow  超出的部分隱藏
text-overflow

text-overflow文本裁剪  clip裁剪文本時不添加...  ellipsis 裁剪時加...  注意:不換行和over-flow控制

text-shadow 陰影
text-indent

背景屬性:
background (縮寫形式)
background-color(背景色 )
background-image(背景圖 )
background-repeat(背景圖重複方式 )
background-position(位置座標、位移量)

列表常用

list-style: none無風格 disc實心圓 circle空心圓 square 實心正方形 decimal 數字

 

盒子屬性:
margin(外邊距/邊界)    以上方為主 可寫1、2、4個值
border(邊框)
padding(內邊距/填充 )

後可加 -top 等方向

border-radius 邊框圓角

box-shadow  陰影

 

變形效果:transform

transform-origin 指定變換的起點

none無變換

translate(長度值或百分比) translateX translateY 在水平、垂直方向平移

scale(數值)scaleX scaleY 在水平方向、垂直方向或兩個方向上縮放

rotate(角度)旋轉元素

skew(角度)skewX skewY  在水平方向、垂直方向或兩個方向上使元素傾斜一定的角度

matrix 自訂

 

過渡效果:transition

transition-property 指定過渡的css屬性 預設值 all

transition-duration 完成過渡的時間

transition-timing-function 指定過渡函數  緩動效果預設值ease 等同於(0.25, 0.1, 0.25, 1.0) 

transition-delay 指定過渡開始出現的延遲時間

 

@keyframes:定義一個動畫

animation

<style>            .t5{            transition: 5s ease-out all;   /*過渡   ease    in 加速   out減速*/        }/*transition-delay延遲*/        .t5:hover{            transform: skew(45deg,45deg)        }        @keyframes key {            0%{                background-color: red;width: 200px;height: 200px;            }            25%{                background-color: orange;width: 100px;height: 100px;transform: rotate(-90deg);            }            50%{                background-color: yellow;width: 60px;height: 60px;transform: none;            }            75%{                background-color: green;width: 120px;height: 120px;transform: none;            }            100%{                background-color: blue;width: 200px;height: 200px;transform: rotate(360deg);            }        }        .kt{            animation:key 1s;           /* animation-iteration-count: infinite;*//*無限迴圈*/            background-color: yellow;            width: 200px;height: 200px;        }

</style><div class="kt t5"></div>

 





 

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.