第四十天

news/2024/7/4 11:04:02

表格 <!DOCTYPE html> <html> <head>  <meta charset="UTF-8">  <title>表格</title>  <style type="text/css">   table {    width: 600px;    height: 400px;    /*border: 1px solid #333;*/   }   td, th {    /*border: 1px solid #333;*/   }  </style> </head> <body>  <!-- table: display: table -->  <!-- th,td: dispaly: table-cell -->

 <!-- tr: 代表表格中的行 -->  <!-- td: 代表表格中的单元格 -->

 <!-- 表格的特点 -->  <!-- 1.表头垂直水平居中 -->  <!-- 2.单元格垂直居中 -->  <!-- 3.cellspacing控制单元格之间的间距 -->  <!-- 4.table的显示特性:内容不超过规定宽高,采用规定的宽高,当内容显示区域的宽高超过规定宽高,表格的宽高由内容显示区域决定 -->  <!-- 5.rules:边框规则,设置后会合并边框(cellspacing失效): groups rows cols all -->  <!-- 6.cellpadding:cell的padding设置,对内容进行格式化布局 -->  <!--  -->  <!-- 7.cell的width可以规定列宽占比 -->  <!-- 8.colspan:合并列 -->  <!-- 9.rowspan:合并行 -->  <table border="1" cellspacing="0" rules="all" cellpadding="10">   <caption align="bottom">表格标题</caption>   <!-- <thead> -->    <tr>     <th width="1%">表头</th>     <th width="3%">表头</th>     <th width="6%">表头</th>    </tr>   <!-- </thead> -->   <!-- <tbody> -->    <tr>     <td colspan="2">单元格</td>     <!-- <td>单元格</td> -->     <td rowspan="2">单元格</td>    </tr>    <!-- </tbody> -->   <!-- <tfoot> -->    <tr>     <td>单元格</td>     <td>单元格</td>     <!-- <td>单元格</td> -->    </tr>   <!-- </tfoot> -->  </table> </body> </html>

垂直居中 <!DOCTYPE html> <html> <head>  <meta charset="UTF-8">  <title>垂直居中</title>  <style type="text/css">   .sup {    width: 200px;    height: 200px;    background-color: red;    /*可以控制内容/子级垂直排列方式*/    display: table-cell;    /*设置垂直排列方式*/    vertical-align: middle;   }   .sub {    width: 100px;    /*height: 100px;*/    background-color: orange;    margin: 0 auto;   }  </style> </head> <body>  <div class="sup">   <div class="sub">多行文本多行文本多行文本多行文本多行文本</div>  </div> </body> </html>

表单 <!DOCTYPE html> <html> <head>  <meta charset="UTF-8">  <title>表单</title> </head> <body>  <!-- form -->  <!-- 作用:将前台用户数据通过get或post请求方式提交给后台,并在新页面标签中接收后台相应 -->  <!-- 请求方式: -->  <!-- get:将数据以url链接拼接方式提交给后台,速度快,但安全性低,且有数据大小限制 -->  <!-- post:将数据以数据包方式提交给后台,速度较慢,但安全性高,且无数据大小限制 -->  <!-- 前后台交换数据的依据为:表单元素的name与value,name为key,value为value -->

 <!-- action:提交的后台接口(请求的服务器指定路径) -->  <!-- method:请求方式 -->  <form action="" method="get">   <div>    <!-- 提交给后台的就是表单元素的name=value -->    <label>用户名:</label><input type="text" name="usr" value="hehe" />   </div>   <div>    <!-- placeholder:文本占位符 -->    <label>密码:</label><input type="password" name="ps" placeholder="请输入密码" />   </div>   <div>    <button type="submit">提交</button>   </div>  </form>

 <!-- 常用表单元素 -->  <form>   <!-- 明文输入框 -->   <input type="text" name="username" placeholder="请输入用户名" size="10" maxlength="15">

  <!-- 密文输入框 -->   <input type="password" name="pwd" placeholder="请输入密码" maxlength="12">

  <!-- 单选框:name必须相同,value需要提前规定 -->   <input type="radio" name="sex" value="male" checked>男   <input type="radio" name="sex" value="female">女

  <!-- 复选框:name必须相同,checked(boolean类型属性) -->   <input type="checkbox" name="hobby" value="basketball"> 篮球   <input type="checkbox" name="hobby" value="football" checked"> 足球   <input type="checkbox" name="hobby" value="ping-pong" checked="checked"> 乒乓球   <input type="checkbox" name="hobby" value="baseball"> 棒球

  <!-- 单选下拉框:name由select设置,value由option提供,selected默认项 -->   <select name="major">       <option value="computer">计算机</option>       <option value="archaeology">考古学</option>       <option value="medicine" selected>医学</option>       <option value="Architecture">建筑学</option>       <option value="Biology">生物学</option>   </select>   <!-- 多选下拉框 -->   <select name="major" multiple>       <option value="computer">计算机</option>       <option value="archaeology">考古学</option>       <option value="medicine">医学</option>       <option value="Architecture">建筑学</option>       <option value="Biology">生物学</option>   </select>

  <!-- 多行文本 -->   <textarea name="content" cols="30" rows="10"></textarea>      <!-- 全局属性设置 -->   <!-- required:value不能为空 -->   <input type="text" name="usr" required />   <input type="text" name="name" pattern="\d" />

  <!-- 按钮 -->   <!-- 重置 -->   <input type="reset" value="自定义重置" />   <!-- 提交 -->   <input type="submit" value="请求">   <!-- 普通按钮 -->   <input type="button" value="普通按钮" οnclick="alert('你丫真帅')">  </form>

 <style type="text/css">   .box {    width: 200px;    height: 0;    background-color: red;    /*display: none;*/    transition: .5s;   }      .usr:focus + .box {    /*display: block;*/    height: 200px;   }  </style>  <form>   <input id="usr" class="usr" type="text" name="usr">   <div class="box"></div>  </form> </body> </html>

音频

<!DOCTYPE html> <html> <head>  <meta charset="UTF-8">  <title>音频</title> </head> <body>  <audio src="media/juhua.mp3" autoplay controls loop preload="auto">当前浏览器不支持audio,该文本便会显示</audio> </body> </html>

视频

<!DOCTYPE html> <html> <head>  <meta charset="UTF-8">  <title>视频</title> </head> <body>  <video width="672" height="378" controls poster="img/poster.png">   <source src="media/HTML5的前世今生.mp4" type="video/mp4"></source>   当前浏览器不支持video直接播放  </video> </body> </html>

形变

<!DOCTYPE html> <html> <head>  <meta charset="UTF-8">  <title>形变</title>  <style type="text/css">   div {    width: 150px;    height: 150px;    background-color: red;    margin: 10px auto;    transition: 3s;   }   /*旋转形变:旋转的是角度 deg*/   .d1:hover {    /*transform: rotateX(3600deg);*/    /*transform: rotateY(3600deg);*/    /*transform: rotateZ(3600deg);*/    transform: rotateX(3600deg) rotateY(3600deg) rotateZ(3600deg);   }   /*偏移形变:偏移的是距离 px*/   .d2:hover {    /*transform: translateX(200px);*/    /*transform: translateY(200px);*/    transform: translateX(200px) translateY(200px);   }   /*缩放形变:缩放的是比例*/   .d3:hover {    transform: scale(2, 0.5);   }   .d4:hover {    /*transform: translateX(200px) rotateZ(3600deg);*/    transform: rotateZ(3600deg) translateX(200px);   }  </style> </head> <body>  <div class="d1"></div>  <div class="d2"></div>  <div class="d3"></div>  <div class="d4"></div> </body> </html>

浏览器适配 <!DOCTYPE html> <html> <head>  <meta charset="UTF-8">  <title>浏览器适配</title>  <style type="text/css">   .box {       width: 200px;       height: 200px;       border-radius: 50%;    font: 900 80px/200px 'STSong';    text-align: center;

      /*径向渐变*/       /*background-image: radial-gradient(red, yellow, green);*/       background-image: -webkit-radial-gradient(left, red, yellow, green);

      /*倒影*/       /*below | above | left | right*/       -webkit-box-reflect: below 2px;   }  </style> </head> <body>  <!-- -o- Opera -->  <!-- -ms- IE -->  <!-- -moz- FireFox -->  <!-- -webkit- Safari Chrome 国内主流浏览器 Android内置浏览器 -->  <div class="box">123</div> </body> </html>

字体图标 <!DOCTYPE html> <html> <head>  <meta charset="UTF-8">  <title>字体图标</title>  <!-- 使用第三方库 -->  <!-- <link href="//netdna.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet"> -->  <!-- <link rel="stylesheet" href="font-awesome-4.7.0/css/font-awesome.min.css"> -->  <link rel="stylesheet" href="font-awesome-4.7.0/css/font-awesome.css">  <style type="text/css">   .i1 {    /*font-size: 30px;*/    color: orange;   }  </style> </head> <body>  <i class="i1 fa fa-spinner fa-4x fa-spin"></i> </body> </html>

盒子阴影 <!DOCTYPE html> <html> <head>  <meta charset="UTF-8">  <title>盒子阴影</title>  <style type="text/css">   .box {    width: 200px;    height: 200px;    background-color: red;    margin: 350px auto;    /*盒子阴影*/    /*x轴偏移 y轴偏移 虚化长度 阴影宽度 阴影颜色*/    /*多个值之间用,隔开*/    box-shadow: -310px 0 30px 0px yellow, 310px 0 30px -10px green, 0 -310px 30px -10px orange, 0 310px 30px -10px blue;   }  </style> </head> <body>  <div class="box"></div> </body> </html>

转载于:https://www.cnblogs.com/zhouhao123/p/9789120.html


http://www.niftyadmin.cn/n/3371133.html

相关文章

521. Longest Uncommon Subsequence I【easy】

521. Longest Uncommon Subsequence I【easy】 Given a group of two strings, you need to find the longest uncommon subsequence of this group of two strings. The longest uncommon subsequence is defined as the longest subsequence of one of these strings and thi…

数据库的一些基础知识

数据库&#xff08;Data Base&#xff09; 数据库&#xff08;Data Base&#xff0c;简称DB&#xff09;是长期存储在计算机内、有组织的、可共享的、统一管理的相关数据的集合。 关系型数据库 绝大多数的数据库系统叫做关系数据库系统&#xff08;relational database system&…

穷忙?~

一直以来,都觉得自己的生活过得好忙碌。。。。读书的时候&#xff0c;常常忙着去上课&#xff0c;或者去吃饭&#xff0c;因为吃完饭&#xff0c;还要忙着去宿舍休息&#xff08;中学的时候是要按时休息的&#xff09;&#xff0c;或者重新赶去上课。初中的时候&#xff0c;有个…

【转】将一棵树转换为二叉树后,为什么根节点没有右子树

树转化为二叉树时结点左子树是原来的孩子结点&#xff0c;右子树是原来的兄弟结点。即取根节点左孩子向右连接他的兄弟结点&#xff08;在同一层次的节点&#xff0c;原来互不相连&#xff09;并把它的子树&#xff0c;而把除左孩子外&#xff0c;原来与根节点相连的线擦除。这…

python之路_面向对象进阶

一、内置函数isinstance和issubclass 1、isinstance() isinstance(obj,cls)检查obj是否是类 cls 的对象&#xff0c;类似type()。 class Foo(object):pass obj Foo() print(isinstance(obj, Foo)) #输出结果&#xff1a;Trueprint(isinstance(10,int)) #输出结果&…

21、Samba配置详解

1、SMB介绍Samba可以实现Linux和Windows的文件共享 SMB&#xff08;Service Message Block&#xff09;涉及的端口smb&#xff1a;tcp 139 445nmbd udp 137 138samba用户是系统用户但密码是独立的&#xff0c;非/etc/shadow中的密码&#xff0c;使用smbpasswd设置访问smb的…

香甜的黄油 Sweet Butter

原题链接&#xff1a;https://www.luogu.org/problem/show?pid1828#sub 经典的最短路问题。 各位不要被题目条件迷惑了&#xff0c;牧场想象成点&#xff0c;道路想象成边&#xff0c;奶牛所在的位置想象成点权就好。 输入的是无向图&#xff0c;所以在正向连边时反向连边。然…

SSH简介及配置使用SSH登陆远程主机

作者Blog&#xff1a;http://blog.csdn.net/s98/原创&#xff1a;房东雨 2004年9月6日1.什么是SSH传统的网络服务程序&#xff0c;如&#xff1a;ftp、POP和telnet在本质上都是不安全的&#xff0c;因为它们在网络上用明文传送口令和数据&#xff0c;别有用心的人非常容易就…