HTML+CSS笔记

头部:

<head>
    <meta charset="UTF-8">
    <title>我的网站</title>
    <style>
        body {
            <!--  字体  -->
            font-family: Arial, sans-serif; 
            <!-- 背景 -->
            background-color: #d2b48c;
            <!-- 边框 -->
            border: 12px dotted green;
            <!-- 边距 -->
            margin-left: 10%;
            margin-right: 10%;
            <!-- 内边距 -->
            padding: 10px 10px 10px 10px;
        }
    </style>
</head>

本体 <body></body>

标题一:                <h1></h1>

标题一:                <h2></h2>

正文:                    <p></p>

图像:                <img src="../person.jpg" alt="这是个靓仔的电影"  width="228" height="128">

斜体:                <em>你真的蔡</em>

文本链接:        <a target="_blank" href="about/directions.html">爱情动作电影</a>

回车下一行:        <br>

行带序号:        

<ol>
  <li>泰森尼克号</li>
</ol>

行带黑点:

<ul>
  <li></li>
</ul>

双引号:                <q>双引号</q>

长引用:                <blockquote></blockquote>

表:                        <table></table>

表格头:                <tr><th></th></tr>

表格行:                <tr><td></th></td>

表头:                   <caption></caption>

文本输入:                <input type="text" name="firstname" value="">

提交按钮:                <input type="submit">

单选按钮:

很帅<input type="radio" name="sunshine" value="hot"><br>
超帅<input type="radio" name="sunshine" value="not"><br>

多选按钮:        

很帅<input type="checkbox" name="sunshine" value="hot"><br>
超帅<input type="checkbox" name="sunshine" value="not"><br>
多行文本输入:        

<textarea name="comments" rows="10" cols="48"></textarea>

选择菜单:

<select name="beans">
  <option value="House Blend">House Blend</option>
  <option value="Bolivia">Shade Grown Bolivia Supremo</option>
  <option value="Guatemala">Organic Guatemala</option>
  <option value="Kenya">Kenya</option>
</select>

数字输入:                

<input type="number" name="bags" min="1" max="10">

范围输入:                

<input type="range" min="1" max="10" step="1">

颜色输入:                

<input type="color">

日期输入:                

<input type="date" name="date">

CSS

字体:                  font-family: Arial, sans-serif;

背景色:                background-color: #d2b48c;

                                background-color: rgb(204,102,0);

边框:                border: 12px dotted green;

多粗、虚线、绿色

边框间距:        

margin-left: 10%;
margin-right: 10%;

内边距:                padding: 10px 10px 10px 10px;

字体位置:                text-align: center;

下边框线:               border-bottom: 1px solid black;

下划线:        text-decoration: underline;

字体倍数:        font-size: 1em;

边框圆角:        border-radius: 10px;

背景图:        background-image: url(images/wife.jpg);

背景图是否重复出现:        background-image: url(images/wife.jpg);

背景位置:        background-position: top;

固定背景图片:        background-attachment: fixed;

如果屏幕小于480使用以下规则:        @media screen and (max-width: 480px) {}

如果屏幕大于481使用以下规则:        @media screen and (min-width: 481px) {}

悬浮右侧:        float: right;

行间距:        line-height: 1;

超链接颜色:

a:visited {
  color: blue;
}
超链接悬浮颜色:        
a:hover {
  color: yellow;
}

每个div间隔设置:        display: table-cell;

左右最大对齐:        display: table-row;

上下最大对齐:        display: table-cell;

按一行来显示:        display: inline;

边界间隙:        border-spacing: 10px;

让ul前面的点消失:        

list-style-type: none;

视屏播放:        

<video controls autoplay>
      <source src="./kaorou.mp4">
</video>

字体阴影:        text-shadow: 2px 2px 2px black;

第一个参数是深远,2是上下,3模糊度

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值