Home  >  Article  >  Web Front-end  >  H5 advanced inline tags

H5 advanced inline tags

php中世界最好的语言
php中世界最好的语言Original
2018-01-10 09:17:592289browse

This time I will bring you H5's advanced inline tags. How to use H5's advanced inline tags? What are the precautions when using H5's advanced inline tags? The following is a practical case, let's take a look.

Inline elements share one line with others, but setting the width and height is invalid. Its characteristics:

① and other elements are all on the same line

② high, the line height and outer margin and inner margin cannot be changed;

③The width is the width of its text or picture and cannot be changed

④Inline elements can only accommodate text or other inline elements

The code is as follows:

<!doctype html>  
<html lang="en">  
<head>  
    <meta charset="UTF-8">  
    <title>标签基础2</title>  
</head>  
<body>  
    <!-- 内联元素 与别人公用一行 但是设置宽高无效 -->  
    <!-- 无语义 -->  
    <span>无语义</span>  
    <!-- 图片 alt图片加载失败显示-->  
    <img src="d" alt="加载失败">  
    <!-- 超链接 -->  
    <a href="http://www.baidu.com">跳转</a>  
    <!-- 斜体强调 -->  
    <var>斜体强调作用</var>  
    <!-- em和i经常用于制作小图标 -->  
    <em>斜体强调作用</em>  
    <i>斜体强调作用</i>  
    <!-- 加粗强调 -->  
    <strong>加粗强调</strong>  
    <!-- 表单 提交数据-->  
    <form action="">  
        <!-- 输入框 -->  
        <input type="text">  
        <!-- 密码输入框 -->  
        <input type="password">  
        <!-- 按钮 -->  
        <input type="button" value="按钮">  
        <!-- 提交表单 -->  
        <input type="submit" value="提交表单">  
        <!-- 日期 年月日-->  
        <input type="date">  
        <!-- 日期 年周 -->  
        <input type="week">  
        <!-- 日期 年月 -->  
        <input type="month">  
        <!-- 日期 当前时间 -->  
        <input type="time">  
        <!-- 选择文件 -->  
        <input type="file" value="打开文件">  
        <!-- 只能输入数字 -->  
        <input type="number">  
        <!-- 颜色选择器 -->  
        <input type="color">  
        <!-- 重置 -->  
        <input type="reset">  
        <!-- 复选框 -->  
        <input type="checkbox">我爱你   
        <input type="checkbox">你爱我   
        <!-- 单选框 name 同名字为一组-->  
        <input type="radio" name="sex" checked="checked">男   
        <input type="radio" name="sex">女   
    </form>  
    <!-- 多行文本 cols宽度 rows高度 -->  
    <textarea name="" id="" cols="30" rows="10"></textarea>  
    <!-- 选择列表 默认第一个选项的值为初始值-->  
    <select name="" id="">  
        <option value="">选项1</option>  
        <option value="">选项2</option>  
        <option value="">选项3</option>  
    </select>  
</body>  
</html>

I believe you have mastered the methods after reading these cases. For more exciting information, please pay attention to other related articles on the php Chinese website!

Related reading:

How to create a drag-and-drop effect in H5

##About the incompatibility of older versions of browsers with H5 and C3 processing method

How to use postMessage in H5 to transfer data between two web pages

The above is the detailed content of H5 advanced inline tags. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn