HTML——标签使用

一、CSS样式使用

title头下
 <style type="text/css">       
        .divform /*样式名称*/{
            position: absolute;/*绝对定位*/
            width: 400px;
            height: 200px;
            text-align: center;/*(让div中的内容居中)*/
            top: 50%;
            left: 50%;
            margin-top: -200px;
            margin-left: -150px;
        }
 </style>
引用
<......   class = "divform" >

二、输入框input

文本输入框
<input type="text">
密码输入框
<input type="password">
常用属性
max : 最大值
min : 最小值
maxlength : 规定输入字段中的字符的最大长度
name :定义 input 元素的名称
pattern :规定输入字段的值的模式或格式,pattern="[0-9]" 表示输入值必须是 0 与 9 之间的数字。
src :定义以提交按钮形式显示的图像的 URL
type:规定 input 元素的类型 button(按钮)checkbox(检查) file(文件)hidden(隐藏)password(密码)radio(声音) submit(提交)text(文本)reset(重置) id(唯一)style(CSS样式)

 三、引用CSS / JS / IMG / HTML

1、引用HTML

 <iframe marginheight="0" marginwidth="0" frameborder="0" board="0" width="150" height="90" src="{% static "Verification Code.html" %}"></iframe>
<object data="xxxx.htm"></object>

2、引用JS

<script type="text/javascript" scr="{% static 'VerCode.js '%}"></script>

3、引用CSS

<link rel="stylesheet" href="../static/style/medicine.css" />

4、引用IMG

 

posted @ 2019-05-08 10:35  澄心元素  阅读(169)  评论(0编辑  收藏  举报