• H5入门


    1.基本骨架

    <!DOCTYPE html>

    <html>

    <head><title>标题</title><meta charset="UTF-8"><link rel="icon" href="路径"/>(link自闭合)</head>

    <body></body>

    </html>

    规范:标签要用<>括起来且要闭合,H5中<meta charset="UTF-8">例外,标签名和属性名要小写。

    2.列表

    有序<ol><li>内容</li>

                 <li>内容</li>

          </ol>

    无序<ul><li>内容</li>

                 <li>内容</li>

          </ul>

    定义描述列表<dl><dt>标题</dt>

                           <dd>内容<dd>

                      </dl>(标题顶格,内容缩进)

    注:可用CSS相互转化:1,list-style-type:"样式"   2,list-style-image:url(路径)(图片代替序号) 3,list-style-posiition:inside/outside(序号是否在内容内)

    3.常见标签:块级标签(自动换行):标题<h1></h1>换行<br/>分割线<hr/>段落<p></p>预格式<pre></pre>引用<blockquote cite="地址"></blockquote>

                   行级标签(按行逐一显示):文本<span></span>图片<img href="路径" title="标题" alt="无法加载" width="" height="" align="center" />(img 也是自闭合)短引用<q cite="地址"></q>强调加粗<strong></strong>强调倾斜<em></em>倾斜<i></i>加粗<b></b>

                  <a href="地址" title="指上的字" target="_self/_blank"></a>      锚链接1,设锚点 <a name="just"></a>2,<a href="#just"></a>(别的页面需在#前加文件名)

                   组合标签:图文组合:<figure><img src="路径"><figcation>标题</figcaption></figure>

                                  分区标签:<div></div>常与CSS配合使用

    4.表格<table><tr>

                               <td>1111</td>

                                <td>2222</td>

                           </tr></table>   一行两列    tr行     td列   

                               重要属性  cellspacing   单元格间距 (合并边框style="border-collapse:collapse)  align整个表格在父容器位置   cellpadding  单元格内边距  border 表格最外边框宽度    background="路径"背景图  

                               colspan跨列   rowspan跨行(跨行跨列都写在td后边)          优先级  td>tr>table

    5.表单  常与table配合使用

            <fom action="传送地址" method="get/post"(get快 post安全,信息量大)><fieldset>表单边界<legend>表单标题</legend>

        <table><tr><td><input type="text" name="q" value="q"/></td></tr>(input常用属性1type种类 2value默认值  3placeholder提示内容  4name输入框的名字一般必不可少  5form 指向特定ID的表单6 autofocus 自动聚焦 7autocomlete自动提示         8required="required"必填

                                                                                                              (type常用属性1text文本2password密码3radio/checkbox单/多选4file文件后跟accept="文件类型"5submit提交6reset重置7image图形提交按钮8button)

                  <tr><td><select name="1"> <optgroup label="333"></optgroup> <option title="2">2</option></select></td></tr>(下拉栏目,名为333的组,选项为2)

                  <tr><td><textarea style="20px:height:20px; resize:none overflow:scroll/hidden/auto">内容</textarea></td></tr></table></form>(resize:none大小不允许修改)

               属性名=属性值

                1checked="checked"  单/多选默认选中    2selected="selected"下拉栏默认选中  3multiple="multiple"下拉栏多选   4disable="disable"禁用  5readonly="readonly"只读   6hidden="hidden"隐藏

                        

  • 相关阅读:
    我的知识库(4) java获取页面编码(Z)
    知识库(3)JAVA 正则表达式 (超详细)
    The Struts dispatcher cannot be found. This is usually caused by using Struts tags without the associated filter. Struts
    某人总结的《英语听力的技巧 》,挺搞的
    我的知识库(5)java单例模式详解
    构建可扩展程序
    SerialPort (RS232 Serial COM Port) in C# .NET
    Python学习笔记——String、Sequences
    UI题目我的答案
    jQuery学习系列学会操纵Form表单元素(1)
  • 原文地址:https://www.cnblogs.com/jyc226/p/6537711.html
Copyright © 2020-2023  润新知