i云笔记内涵资源: 编程思路笔记,源码分享,思路解答分享,封装函数分享,演示Demo等内容。 上传笔记可长期保存,笔记内容可进行加粗,居中,标记等功能,笔记可 置顶 不同的等级,将重要的笔记内容放前面。笔记内容可进行 加密 ,加密后不展示在首页,内容只能被自己查看! 有问题可联系QQ3399769530 或微信cm1598421 添加时备注来意 网站已运行 {DAY_COUNT} 天 已有笔记 {CONTENT_COUNT} 篇
进制转换器 http://notei.cn/tool/tool_hex.html MD5加密工具 http://notei.cn/tool/tool_md5.html Base64加解密 http://notei.cn/tool/tool_base64.html Aes加解密工具 http://notei.cn/tool/tool_Aes.html 前端学习软件 http://h5.notei.cn
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Custom Font Example</title> <style> /* 使用@font-face规则定义字体 */ @font-face { font-family: 'AkalTun'; /* 定义一个字体名 */ src: url('https://akaltun.cn/1/akaltun.ttf') format('truetype'); /* 指定字体文件和格式 */ } /* 应用自定义字体到body,也可以应用到其他元素 */ body { font-family: 'AkalTun', sans-serif; /* 将字体应用到body,如果字体加载失败则回退到sans-serif */ } </style> </head> <body> <div id="container"> <h1>欢迎来到我的网站ئۇيغۇرچە</h1> <p>这里是使用自定义字体的文本。</p> <!-- 其他内容 --> </div> </body> </html>
Mysql外链约束规则
java的mvc三层架构分别是: View(界面层),Service(业务逻辑层),DAO(数据访问层) V:View 网页视图,为用户提供能够看到并且使用的界面,与用户直接进行交互。 M:Model,业务模型,处理业务 C:Controller,控制器,处理请求,调用模型和视图 dao层负责对数据进行直接操控,最底层 service层负责对传递过来的参数验证,以及其他逻辑验证操作。验证完毕访问dao层进行数据操控 servlet层负责接收参数,然后调用service层进行处理 三个层分工合作,有利于后期的功能维护,那层出了问题就去处理哪层
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Document</title> <style> * { padding: 0; margin: 0; } li { list-style-type: none; } a { text-decoration: none; } .nav-box { width: 980px; height: 90px; margin: 20px auto; display: flex; align-items: center; } .right { flex: 1; margin-left: 20px; } .right-top-tag li { display: inline-block; font-size: 12px; border-radius: 3px 3px 0 0; overflow: hidden; } .right-top-tag li a { color: #666; padding: 5px 15px; display: inline-block; } .right-search { margin-top: -4px; display: flex; } .right-search input { border: 3px solid #F37B03; width: 100%; height: 27px; background: url("./images/tb/search.jpg") no-repeat 10px; flex: 1; outline: none; padding-left: 30px; color: #666; } .right-search .button { flex-shrink: 1; width: 133px; height: 33px; background: url("images/tb/button.jpg") no-repeat; border: none; } .right-search .tip { height: 33px; } .right-search .tip p { line-height: 16px; font-size: 12px; margin-left: 10px; color: #666; } .right-title-nav ul li { display: inline-block; margin-top: 6px; } .right-title-nav ul li a { color: #555; font-size: 12px; margin-right: 12px; } </style> </head> <body> <div class="nav-box"> <div class="left"> <img src="./images/tb/logo.jpg" alt=""> </div> <div class="right"> <div class="right-top-tag"> <ul> <li style="background-color: #F37B03;"><a style="color: #fff;" href="#"> 宝贝 </a></li> <li><a href="#"> 天猫<span style="color: #f79a3d;">(淘宝商城)</span> </a></li> <li><a href="#"> 店铺 </a></li> </ul> </div> <div class="right-search"> <input type="text"> <button class="button"></button> <div class="tip"> <p>高级搜索</p> <p>使用帮助</p> </div> </div> <div class="right-title-nav"> <ul> <li> <a href="#">长裙</a> </li> <li> <a href="#">时尚包包</a> </li> <li> <a href="#">新款连衣裙</a> </li> <li> <a href="#">中老年夏服</a> </li> <li> <a href="#">新款连衣裙</a> </li> <li> <a href="#">中老年夏服</a> </li> <li> <a href="#">更多>></a> </li> </ul> </div> </div> </div> </body> </html>
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <title>Document</title> <style> * { padding: 0; margin: 0; } div { box-sizing: border-box; color: #DE8786; } .mainbox { width: 980px; margin: 0 auto; } .nav { background-color: #FE9AB5; } .nav .item { display: inline-block; line-height: 46px; padding: 0 30px; color: #fff; } .banner { text-align: center; } .frombox { background: url("./images/content_bg.jpg"); padding: 0 180px; } .step { padding: 10px 0; } .step .tip { font-size: 20px; line-height: 42px; float: left; } .userinfo .title { border-bottom: 1px solid #FE9AB5; line-height: 42px; margin-bottom: 10px; } input { border: 1px solid #FE9AB5; } .tableinput { padding: 5px 30px; } .tableinput tr { margin: 10px 0; } .tableinput .info { width: 220px; height: 22px; } .tableinput tr .titles { text-align: right; } .tableinput select { width: 168px; border-color: #FE9AB5; color: #FE9AB5; } </style> </head> <body> <div class="content"> <div class="logo mainbox"> <img src="./images/logo.jpg" alt=""> </div> <div class="nav"> <ul class="mainbox"> <li class="item">首页</li> <li class="item">会员</li> <li class="item">活动</li> <li class="item">直播</li> <li class="item">视频</li> <li class="item" style="background-color: #FE9AB5;">注册</li> </ul> </div> <div class="banner"> <img src="./images/banner.jpg" alt=""> </div> <div class="frombox mainbox"> <div class="step"> <span class="tip">注册步骤:</span> <img src="./images/step.jpg" alt=""> </div> <div class="userinfo"> <p class="title">您的账号信息:</p> <table class="tableinput"> <tr> <td class="titles">注册方式:</td> <td><input type="radio"> E-main注册 <input type="radio"> 手机号码注册</td> </tr> <tr> <td>注册邮箱:</td> <td><input class="info" type="email"></td> </tr> <tr> <td class="titles">注册手机:</td> <td><input class="info" type="email"></td> </tr> <tr> <td class="titles">登录密码:</td> <td><input class="info" type="email"></td> </tr> <tr> <td class="titles">昵称:</td> <td><input class="info" type="email"></td> </tr> </table> </div> <div class="userinfo"> <p class="title">您的个人信息:</p> <table class="tableinput"> <tr> <td class="titles">性别:</td> <td><input type="radio"> 男 <input type="radio"> 女</td> </tr> <tr> <td class="titles">学历:</td> <td><select> <option value="初中">初中</option> <option value="高中">高中</option> <option value="大专">大专</option> <option value="本科">本科</option> </select></td> </tr> <tr> <td class="titles">所在城市:</td> <td><select> <option value="北京">北京</option> <option value="江西">江西</option> <option value="四川">四川</option> </select></td> </tr> </table> </div> </div> </div> </body> </html>
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <title>Document</title> <style> body { background-color: #EBEBEB; } .content { background: url("images/form_bg.jpg"); width: 1430px; height: 717px; margin: 0 auto; position: relative; } .frombox { width: 700px; height: 540px; position: absolute; top: 160px; left: 700px; } .title { text-align: center; font-size: 24px; } .line { padding: 7px 0; font-size: 15px; } .line input { height: 26px; width: 220px; } .line .tip { text-align: right; display: inline-block; width: 90px; } .line.color input { width: 120px; } .line.btn input { background-color: #93B518; color: #fff; width: 120px; height: 36px; border: 0; margin: 15px 28px; } </style> </head> <body> <div class="content"> <div class="frombox"> <h1 class="title">传智学员信息登记表</h1> <form action="" method="GET"> <div class="line"> <label class="tip">用户登录名:</label> <input type="text" name="username" value="mymail@163.com" readonly="readonly" disabled="disabled"> <label>(不能修改,只能查看)</label> </div> <div class="line"> <label class="tip">真实姓名:</label> <input type="text" name="name" placeholder="例如:王鹏" required pattern="^[\u4e00-\u9fa5]+$"> <label>(必须填写,只能输入汉字)</label> </div> <div class="line"> <label class="tip">真实年龄:</label> <input type="number" name="age" min="0" max="100" value="24" required placeholder="16-100"> <label>(必须填写)</label> </div> <div class="line"> <label class="tip">出生日期:</label> <input type="date" name="date" required> <label>(必须填写)</label> </div> <div class="line"> <label class="tip">电子邮箱:</label> <input type="email" name="email" placeholder="123456@qq.com" required> <label>(必须填写)</label> </div> <div class="line"> <label class="tip">身份证号:</label> <input type="text" name="idcard" required pattern="^[0-9]{17}[0-9Xx]$"> <label>(必须填写,能够以数字,字母x结尾的短身份证号)</label> </div> <div class="line"> <label class="tip">手机号码:</label> <input type="tel" name="tel" required> <label>(必须填写)</label> </div> <div class="line"> <label class="tip">个人主页:</label> <input type="url" name="myurl" placeholder="http://bk.notei.cn"> <label>(请选择网址)</label> </div> <div class="line color"> <label class="tip">幸运颜色:</label> <input type="color" name="luckcolor" value="#E2D546"> <label>(请选择你喜欢的颜色)</label> </div> <div class="line btn"> <input type="submit" value="提交"> <input type="reset" value="重置"> </div> </form> </div> </div> </body> </html>
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <title>Document</title> <style> * { margin: 0; padding: 0; } div { box-sizing: border-box; } body { background-color: #FFF9ED; } a { text-decoration: none; color: #333; } li { list-style-type: none; } .content { display: flex; flex-direction: column; justify-content: center; align-items: center; } .container { width: 980px; margin: 0 auto; height: 100px; } .nav { background: url("images/head_bg.jpg") repeat-x; height: 128px; width: 100%; } .nav li { float: left; } .nav .item a { display: inline-block; width: 120px; height: 128px; line-height: 64px; text-align: center; color: #fff; margin: 0 5px; font-size: 17px; } .nav .item a:hover { background: url("images/xuanfu.png") no-repeat; } .banner img { width: 100%; } .borbox { background-color: #EC6E47; padding: 10px 30px; height: auto; } .borbox ul { width: 100%; display: flex; padding: 10px; background-color: #fff; } .borbox ul li { flex: 1 0 0; height: 100%; margin: 0 3px; } .borbox ul li .flexbox { display: flex; } .borbox ul li div { background-color: #242424; color: #fff; } .borbox ul li .top { margin-bottom: 8px; } .borbox ul li .name { text-align: center; flex: 1 0 0; } .borbox ul .left .top .name { line-height: 169px; } .borbox ul .left .bottom .name { line-height: 137px; } .borbox ul .center .top { height: 117px; line-height: 117px; } .borbox ul .center .bottom { height: 189px; line-height: 189px; } .borbox ul .right .top { height: 313px; line-height: 313px; } .morebox { margin-top: 50px; text-align: left; height: auto; } .morebox>.title { display: inline-block; background-color: #EC6E47; color: #fff; padding: 10px 20px; font-size: 16px; font-weight: normal; } .morebox .list { display: flex; gap: 8px; background-color: #fff; padding: 10px; border: 1px solid #ccc; } .morebox .list li { flex: 1 0 0; border: 1px solid #ccc; padding-bottom: 15px; } .morebox .list li img { width: 100%; border-bottom: 1px solid #ccc; } .morebox .list li .title { text-align: center; width: 100%; color: #666; padding: 10px 0; font-size: 18px; } .morebox .list li .buybox { width: 80%; margin: 0 auto; background: url("./images/gouwu.jpg") no-repeat; background-color: #EC6E47; color: #fff; padding-left: 56px; height: 36px; line-height: 36px; } .footer { background-color: #111; width: 100%; color: #fff; padding: 50px 0; text-align: center; font-size: 14px; line-height: 29px; } </style> </head> <body> <div class="content"> <div class="nav"> <ul class="container"> <li><img src="./images/logo.png" alt="logo"></li> <li class="item"><a href="#">穿搭速递</a></li> <li class="item"><a href="#">时尚大片</a></li> <li class="item"><a href="#">星着装</a></li> <li class="item"><a href="#">时尚园</a></li> <li class="item"><a href="#">时尚专栏</a></li> <li class="item"><a href="#">会员/登录</a></li> </ul> </div> <div class="banner"> <img src="./images/banner.jpg" alt=""> </div> <div class="borbox container"> <ul> <li class="left"> <div class="top flexbox"> <img src="./images/pic01.jpg" alt=""> <p class="name">明星时尚</p> </div> <div class="bottom flexbox"> <img src="./images/pic02.jpg" alt=""> <p class="name">明星时尚</p> </div> </li> <li class="center"> <div class="top flexbox"> <img src="./images/pic03.jpg" alt=""> <p class="name">明星时尚</p> </div> <div class="bottom flexbox"> <img src="./images/pic04.jpg" alt=""> <p class="name">明星时尚</p> </div> </li> <li class="right"> <div class="top flexbox"> <img src="./images/pic05.jpg" alt=""> <p class="name">明星时尚</p> </div> </li> </ul> </div> <div class="morebox container"> <h2 class="title">潮流前沿/Tadil current</h2> <ul class="list"> <li> <img src="./images/match01.jpg" alt=""> <p class="title">潮流饰品</p> <div class="buybox"> 快速购买通道 </div> </li> <li> <img src="./images/match02.jpg" alt=""> <p class="title">潮流饰品</p> <div class="buybox"> 快速购买通道 </div> </li> <li> <img src="./images/match03.jpg" alt=""> <p class="title">潮流饰品</p> <div class="buybox"> 快速购买通道 </div> </li> <li> <img src="./images/match04.jpg" alt=""> <p class="title">潮流饰品</p> <div class="buybox"> 快速购买通道 </div> </li> </ul> </div> <div class="footer"> <p> All right reseved©2006-2016 CHAOUUFUSHI.com, All right reseved</p> <p>2021-2018, 版权所有 潮流服饰 85CP备案13385453</p> </div> </div> </body> </html>
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Document</title> <style type="text/css"> * { padding: 0; margin: 0; } li { list-style: none; } div { box-sizing: border-box; } .min-content { width: 980px; margin: 0 auto; } .content { width: 1280px; margin: 0 auto; } .header { height: 120px; line-height: 120px; background: #fff; } .header .logo { float: left; height: 80px; margin-top: 20px; } .header .goto { float: right; color: #666; } .header .goto a { color: #666; text-decoration: none; } .navbox { height: 60px; background: #404042; line-height: 60px; color: #fff; font-size: 18px; } .navbox ul li { padding: 0 42px; float: left; } .navbox ul li:hover { background-color: #DA5454; } .banner img { width: 100%; } .function ul { display: flex; } .function ul li { padding: 34px 0; flex: 1 0 0; border: 1px solid #ddd; border-top: 0; border-spacing: 0; } .function .item img { height: 50px; margin: 0 15px 0 28px; float: left; } .function .item .info .title { font-size: 17px; } .function .item .info .subtitle { font-size: 14px; color: #666; } .demobox,.newsbox { margin-top: 10px; } .demobox ul .item { float: left; margin: 3px 8px; } .demobox .title,.newsbox .title { line-height: 56px; border-bottom: 1px solid #ddd; margin-bottom: 10px; color: #222; font-size: 18px; } .newsbox .itemtitle { font-size: 15px; color: #444; } .newsbox>ul { display: flex; gap: 15px; } .newsbox>ul .listbox { flex: 1 0 0; border: 1px solid #ddd; padding: 25px 20px; } .newsbox>ul .listbox .itemtitle { margin-bottom: 5px; } .newsbox>ul .listbox ul .item { border-bottom: 1px solid #ddd; padding: 20px 0; } .newsbox>ul .listbox ul .item img { float: left; margin-right: 15px; } .newsbox>ul .listbox ul .item .infotitle { font-size: 16px; color: #222; } .newsbox>ul .listbox ul .item .subtitle { font-size: 13px; color: #aaa; } .footer { padding: 46px; margin-top: 20px; background-color: #111; text-align: center; color: #fff; line-height: 36px; font-size: 15px; } </style> </head> <body> <div class="content"> <div class="min-content"> <div class="header"> <img class="logo" src="./images/logo.png" alt="logo"> <div class="goto"> <a href="#">登录</a> | <a href="#">注册</a> </div> </div> </div> <div class="navbox"> <div class="min-content"> <ul> <li class="item">首页</li> <li class="item">设计案例</li> <li class="item">装修图库</li> <li class="item">有问必答</li> <li class="item">逛商品</li> </ul> </div> </div> <div class="banner"> <img src="./images/banner.jpg" alt="banner"> </div> <div class="function min-content"> <ul> <li class="item"> <img src="./images/pic01.jpg" alt=""> <div class="info"> <p class="title">浏览真实设计案例</p> <p class="subtitle">设计师原创作品</p> </div> </li> <li class="item"> <img src="./images/pic02.jpg" alt=""> <div class="info"> <p class="title">浏览真实设计案例</p> <p class="subtitle">设计师原创作品</p> </div> </li> <li class="item"> <img src="./images/pic03.jpg" alt=""> <div class="info"> <p class="title">浏览真实设计案例</p> <p class="subtitle">设计师原创作品</p> </div> </li> <li class="item"> <img src="./images/pic04.jpg" alt=""> <div class="info"> <p class="title">浏览真实设计案例</p> <p class="subtitle">设计师原创作品</p> </div> </li> </ul> </div> <div class="demobox min-content"> <h4 class="title">设计案例</h4> <ul> <li class="item"> <img src="./images/pic05.jpg" alt=""> </li> <li class="item"> <img src="./images/pic06.jpg" alt=""> </li> <li class="item"> <img src="./images/pic07.jpg" alt=""> </li> <li class="item"> <img src="./images/pic08.jpg" alt=""> </li> <li class="item"> <img src="./images/pic09.jpg" alt=""> </li> <li class="item"> <img src="./images/pic10.jpg" alt=""> </li> </ul> </div> <div class="newsbox min-content"> <h4 class="title">最新动态</h4> <ul> <li class="listbox"> <h3 class="itemtitle">有问必答</h3> <ul class=""> <li class="item"> <img src="./images/pic01.png" alt=""> <div class="info"> <p class="infotitle">家具用品哪个品牌好</p> <p class="subtitle">回答:谢美家居用品很多错...</p> </div> </li> <li class="item"> <img src="./images/pic02.png" alt=""> <div class="info"> <p class="infotitle">家具用品哪个品牌好</p> <p class="subtitle">回答:谢美家居用品很多错...</p> </div> </li> <li class="item"> <img src="./images/pic03.png" alt=""> <div class="info"> <p class="infotitle">家具用品哪个品牌好</p> <p class="subtitle">回答:谢美家居用品很多错...</p> </div> </li> </ul> </li> <li class="listbox"> <h3 class="itemtitle">发布需求</h3> <ul class=""> <li class="item"> <img src="./images/pic04.png" alt=""> <div class="info"> <p class="infotitle">家具用品哪个品牌好</p> <p class="subtitle">回答:谢美家居用品很多错...</p> </div> </li> <li class="item"> <img src="./images/pic05.png" alt=""> <div class="info"> <p class="infotitle">家具用品哪个品牌好</p> <p class="subtitle">回答:谢美家居用品很多错...</p> </div> </li> <li class="item"> <img src="./images/pic06.png" alt=""> <div class="info"> <p class="infotitle">家具用品哪个品牌好</p> <p class="subtitle">回答:谢美家居用品很多错...</p> </div> </li> </ul> </li> <li class="listbox"> <h3 class="itemtitle">预约设计师</h3> <ul class=""> <li class="item"> <img src="./images/pic06.png" alt=""> <div class="info"> <p class="infotitle">家具用品哪个品牌好</p> <p class="subtitle">回答:谢美家居用品很多错...</p> </div> </li> <li class="item"> <img src="./images/pic07.png" alt=""> <div class="info"> <p class="infotitle">厨房在哪个方位风水好</p> <p class="subtitle">回答:看风水要结合...</p> </div> </li> <li class="item"> <img src="./images/pic08.png" alt=""> <div class="info"> <p class="infotitle">卧室多大比较合适</p> <p class="subtitle">回答:一般卧室的大小...</p> </div> </li> </ul> </li> </ul> </div> </div> <div class="footer"> <p>关于我们 | 联系我们 | 意见建议 | 帮助中心 | 使用条款</p> <p>免责声明:本网站部分内容由用户自行上传,如权利人发现存在误传其作品情形,请及时与本站联系。</p> </div> </body> </html>
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Document1</title> <style> * { padding: 0; margin: 0; } li { list-style: none; } a { color: #666; text-decoration: none; } .content { width: 1280px; margin: 0 auto; } .nav { height: 600px; background: url("images/bg.png") center; background-size: cover; } .navlist { padding: 30px 60px; box-sizing: border-box; text-align: center; } .navlist ul li { float: left; line-height: 60px; padding: 0 50px; font-size: 16px; } .seach { position: relative; width: 128px; height: 36px; margin-top: 12px; } .seach img { height: 16px; position: absolute; top: calc(50% - 8px); left: 10px; z-index: 10; } .seach .input { position: absolute; top: 0; left: 0; height: 100%; width: 100%; border: none; border-radius: 18px; font-size: 12px; padding-left: 32px; box-sizing: border-box; outline: none; color: #666 } .hot { text-align: center; margin-top: 20px; } .hotlist { margin-top: 20px; text-align: left; padding: 0 60px; box-sizing: border-box; } .hotlist .item .img img { width: 100%; } .hotlist .item .title { padding: 10px; box-sizing: border-box; font-weight: bold; font-size: 18px; color: #333; border-bottom: 1px solid #ddd; } .hotlist .item .info { padding: 10px; padding-bottom: 30px; color: #bbb; box-sizing: border-box; } .hotlist { display: flex; gap: 80px; } .bottomimage img { width: 100%; } .life { background-color: #E1EBF2; margin-top: 50px; text-align: center; padding: 30px 0; } .life ul { text-align: center; } .life ul li { display: inline-block; margin: 20px 20px; } .footer { height: 80px; background: url("images/footer_bg.jpg"); color: #fff; text-align: center; line-height: 80px; margin-top: 50px; } </style> </head> <body> <div class="content"> <div class="nav"> <div class="navlist"> <ul> <li> <img class="logo" src="./images/logo.png" alt=""> </li> <li><a href="#">网站首页</a></li> <li><a href="#">床和床垫</a></li> <li><a href="#">卧室纺织品</a></li> <li><a href="#">灯具照明</a></li> <li class="seach"> <img src="./images/f.png" alt=""> <input class="input" type="text" placeholder="输入商品名称"> <li> </ul> </div> </div> <div class="hot"> <img src="./images/dongtai.jpg" alt=""> <ul class="hotlist"> <li class="item"> <dt class="box"> <dd class="img"> <img src="./images/news1.jpg" alt=""> </dd> <dd class="title">BEST贝达</dd> <dd class="info">将杂乱无章的物品收纳到视线之外,在我怕门后要展示台的心爱之物!</dd> <dd class="bottomimage"><img src="./images/yinying.jpg" alt=""></dd> </dt> </li> <li class="item"> <dt class="box"> <dd class="img"> <img src="./images/news2.jpg" alt=""> </dd> <dd class="title">BEST贝达</dd> <dd class="info">将杂乱无章的物品收纳到视线之外,在我怕门后要展示台的心爱之物!</dd> <dd class="bottomimage"><img src="./images/yinying.jpg" alt=""></dd> </dt> </li> <li class="item"> <dt class="box"> <dd class="img"> <img src="./images/news3.jpg" alt=""> </dd> <dd class="title">BEST贝达</dd> <dd class="info">将杂乱无章的物品收纳到视线之外,在我怕门后要展示台的心爱之物!</dd> <dd class="bottomimage"><img src="./images/yinying.jpg" alt=""></dd> </dt> </li> </ul> </div> <div class="life"> <img src="./images/shenghuo.png" alt=""> <ul> <li><img src="./images/img1.jpg" alt=""></li> <li><img src="./images/img2.jpg" alt=""></li> <li><img src="./images/img3.jpg" alt=""></li> </ul> </div> </div> <div class="footer"> 爱家居版权所有2016-2026京ICP备222222222号 京公网安备2222222222222 </div> </body> </html>
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Document2</title> <style> * { margin: 0; padding: 0; } li { list-style: none; } .main { width: 980px; margin: 0 auto; } .top { background: url("images/logo.jpg") no-repeat; background-position: 50px; height: 56px; line-height: 56px; margin-top: 10px; } .top .user { float: right; margin-right: 50px; } .top .user a { color: #FF9C00; text-decoration: none; } .nav { background-color: #FF9C00; height: 46px; margin-top: 10px; text-align: center; line-height: 46px; font-size: 16px; } .navlist li { display: inline-block; height: 100%; } .navlist li a { height: 100%; padding: 0 25px; color: #B55F23; text-decoration: none; display: inline-block; } .navlist li a:hover { background-color: #fca76a; } .banner { height: 432px; background: url("./images/banner.jpg") no-repeat center; background-size: cover; } .infobox { height: 160px; background-color: #E7BF80; } .infobox ul { text-align: center; } .infobox ul li { width: 120px; height: 120px; border-radius: 50%; display: inline-block; margin: 0 20px; margin-top: 20px; overflow: hidden; position: relative; } .infobox ul li .icon { width: 120px; position: absolute; left: 0; } .infobox ul li .title { color: #A47167; position: absolute; text-align: center; top: 76px; width: 100%; } .shoplist { background-color: #F8F5BC; padding: 50px 80px; padding-bottom: 60px; } .shoplist ul { display: flex; gap: 20px; flex-wrap: wrap; } .shoplist .item { flex: 20%; background-color: #fff; border: 1px solid #ddd; padding: 10px; box-sizing: border-box; } .shoplist .item img { width: 100%; } .shoplist .item .title,.shoplist .item .price { color: #A47167; margin-top: 5px; } .shoplist .item .name,.shoplist .item .price span { color: #FDA6A0; margin-top: 5px; } .footer { height: 120px; line-height: 120px; text-align: center; color: #fff; background: url("./images/footer.png") repeat-x; margin-top: -10px; } </style> </head> <body> <div class="main"> <div class="top"> <div class="user"> <a href="#">登录 |</a> <a href="#">注册</a> </div> </div> <div class="nav"> <ul class="navlist"> <li><a href="#">首页</a></li> <li><a href="#">公司简介</a></li> <li><a href="#">美食甜品</a></li> <li><a href="#">用户留言</a></li> <li><a href="#">联系我们</a></li> </ul> </div> <div class="banner"></div> <div class="infobox"> <ul> <li> <img class="icon" src="./images/list1.png" alt=""> <p class="title">提拉米苏</p> </li> <li> <img class="icon" src="./images/list2.png" alt=""> <p class="title">甜甜圈</p> </li> <li> <img class="icon" src="./images/list3.png" alt=""> <p class="title">芝士蛋糕</p> </li> <li> <img class="icon" src="./images/list4.png" alt=""> <p class="title">马卡龙</p> </li> <li> <img class="icon" src="./images/list5.png" alt=""> <p class="title">西式甜点</p> </li> </ul> </div> <div class="shoplist"> <ul> <li class="item"> <img src="./images/con1.jpg" alt=""> <p class="title">爱的N次方</p> <p class="name">马卡龙</p> <p class="price">价格:<span>30元</span></p> </li> <li class="item"> <img src="./images/con2.jpg" alt=""> <p class="title">果肉果冻</p> <p class="name">双色马卡龙</p> <p class="price">价格:<span>30元</span></p> </li> <li class="item"> <img src="./images/con3.jpg" alt=""> <p class="title">芒果味</p> <p class="name">补丁马卡龙</p> <p class="price">价格:<span>30元</span></p> </li> <li class="item"> <img src="./images/con4.jpg" alt=""> <p class="title">果冻荔枝味</p> <p class="name">多彩马卡龙</p> <p class="price">价格:<span>30元</span></p> </li> <li class="item"> <img src="./images/con5.jpg" alt=""> <p class="title">果冻巧克力</p> <p class="name">西式甜点</p> <p class="price">价格:<span>30元</span></p> </li> <li class="item"> <img src="./images/con6.jpg" alt=""> <p class="title">流动水果</p> <p class="name">提拉米苏</p> <p class="price">价格:<span>30元</span></p> </li> <li class="item"> <img src="./images/con7.jpg" alt=""> <p class="title">玫瑰花型</p> <p class="name">马卡龙</p> <p class="price">价格:<span>30元</span></p> </li> <li class="item"> <img src="./images/con8.jpg" alt=""> <p class="title">木买奶油</p> <p class="name">芝士蛋糕</p> <p class="price">价格:<span>30元</span></p> </li> </ul> </div> <div class="footer"> 西式甜点网版权所有2000-2016京ICP备08001421号 京公网安备110108007702 </div> </div> </body> </html>
#include <REGX52.H> #include <INTRINS.H> #include "app/Timer0.h" sbit left_lun_1 = P0^2; sbit left_lun_2 = P0^3; sbit right_lun_1 = P0^0; sbit right_lun_2 = P0^1; unsigned char SBUFs,DIAN_state; void UART_init(){ //9600bps@11.0592MHz SCON = 0x50; PCON |= 0x80; TMOD |= 0x20; //设置定时器模式 TL1 = 0xFA; //设定定时初值 TH1 = 0xFA; //设定定时初值 ES = 1; //开启接受 EA = 1; ET1 = 0; TR1 = 1; //定时器1开始计时 } void main (){ UART_init(); //初始化定时器1 Timer0Init(); //初始化定时器0 left_lun_1 = 0;left_lun_2 = 0;right_lun_1 = 0;right_lun_2 = 0; //默认状态 while(1){ } } void Delay1000us() //@11.0592MHz { unsigned char i, j; _nop_(); _nop_(); i = 200; j = 105; do { while (--j); } while (--i); } void UART_Routine() interrupt 4 { RI = 0; //SBUF为接受到的信息 SBUFs = SBUF; } void Timer0_Routine() interrupt 1 { static unsigned int T0Count; TL0 = 0x18; //设置定时初值 TH0 = 0xFC; //设置定时初值 T0Count++; if(T0Count >= 1000)T0Count = 0; if(SBUFs == 0x00){ //停止 left_lun_1 = 0;left_lun_2 = 0;right_lun_1 = 0;right_lun_2 = 0; DIAN_state = 0; } if(SBUFs == 0xFF){ //取消转弯 if(DIAN_state == 0) SBUFs = 0x00; if(DIAN_state == 1) SBUFs = 0x01; if(DIAN_state == 2) SBUFs = 0x02; } if(SBUFs == 0x01){ //前进 left_lun_1 = 0;left_lun_2 = 1;right_lun_1 = 0;right_lun_2 = 1; DIAN_state = 1; } if(SBUFs == 0x02){ //后退 left_lun_1 = 1;left_lun_2 = 0;right_lun_1 = 1;right_lun_2 = 0; DIAN_state = 2; } if(SBUFs == 0x03){ //转弯 左 right_lun_1 = 0;right_lun_2 = 1; if(DIAN_state == 1){ if(T0Count >= 4){ T0Count = 0; left_lun_1 = 0;left_lun_2 = 1; }else{ left_lun_1 = 0;left_lun_2 = 0; } }else if(DIAN_state == 2){ if(T0Count >= 4){ T0Count = 0; right_lun_1 = 1;right_lun_2 = 0; }else{ right_lun_1 = 0;right_lun_2 = 0; } } } if(SBUFs == 0x04){ //转弯 右 left_lun_1 = 0;left_lun_2 = 1; if(DIAN_state == 1){ if(T0Count >= 4){ T0Count = 0; right_lun_1 = 0;right_lun_2 = 1; }else{ right_lun_1 = 0;right_lun_2 = 0; } }else if(DIAN_state == 2){ if(T0Count >= 4){ T0Count = 0; left_lun_1 = 1;left_lun_2 = 0; }else{ left_lun_1 = 0;left_lun_2 = 0; } } } } P0口接了四个电机,0-3接口接两个电机,另外两个共享电源 前面调用了定时器0的void
Python常用的循环函数是 while 和 for 先说明while循环的格式 while 循环条件: 代码段 如: i = 10 while i > 0: i-=1 print(i) 将会依次打印出9 - 0 for循环也是类似: for 临时变量 in 目标对象: 代码段 如: for i in [0,1,2,3]: print(i) 将会打印出数据集内全部数据 当然也可以依次遍历字符串如: for i in "Python Go": print(i) 将会依次打印单个字符结果 死循环用法: while True: 代码段 另外可以用: while(循环条件) 以及 for(i in "Python")这种用括号包含条件的方法
<?php /** * 功能:Curl外部资源请求函数封装 */ function postUrl($url,$data=[]){ /* $url - 指向URL连接 $data - 提交POST数据 */ $ch=curl_init(); curl_setopt($ch,CURLOPT_POST, true); curl_setopt($ch,CURLOPT_RETURNTRANSFER, true); curl_setopt($ch,CURLOPT_URL,$url); curl_setopt($ch,CURLOPT_POST,count($data)); curl_setopt($ch,CURLOPT_POSTFIELDS,$data); $response=curl_exec($ch); curl_close($ch); $result = json_decode($response,true); return $result; } #发送POST请求
<!DOCTYPE html> <html lang="zh"> <head> <meta charset="UTF-8"> <title>Document1</title> <style> * { margin: 0; padding: 0; } .main-box { width: 980px; margin: 0 auto; } .header { height: 68px; } .header .logo1 { float: left; } .header .logo2 { float: right; } .list-box { height: 320px; } .list-box ul { height: 400px; margin-top: 68px; } .list-box ul li { float: left; width: 20%; list-style: none; text-align: center; } </style> </head> <body> <div class="main-box"> <div class="header"> <img class="logo1" src="./images/t1/logo.jpg" alt="logo1"> <img class="logo2" src="./images/t1/logo2.jpg" alt="logo2"> </div> <div class="list-box"> <ul> <li> <img class="image" src="./images/t1/person1.jpg" alt=""> <p class="text">person1</p> </li> <li> <img class="image" src="./images/t1/person2.jpg" alt=""> <p class="text">person2</p> </li> <li> <img class="image" src="./images/t1/person3.jpg" alt=""> <p class="text">person3</p> </li> <li> <img class="image" src="./images/t1/person4.jpg" alt=""> <p class="text">person4</p> </li> <li> <img class="image" src="./images/t1/person5.jpg" alt=""> <p class="text">person5</p> </li> </ul> </div> </div> </body> </html>
双绞线 同轴电缆 光纤电缆 无线传输介质 局域网 广域网 城域网 公用网 专用网 计算机功能可归纳为 资源共享 信息传输 提高系统的可靠性 分布处理 增强系统的扩充性 Internet(因特网)是全球最大链接能力最强.... TCP/IP是Internet最基本的协议,别名为网络通信协议 TCP传输层,IP网络层,TCP是可靠传输,UDP是不可靠传输 TCP主要用在通信,UDP一般用在视频 TCP/IP分为四层: 网络接口层 互连网络层 传输层 应用层 计算机特点: 运算速度快 精准度高 具有记忆和逻辑判断能力 程序运行自动化 一个完整的硬件系统由 运算器 控制器 存储器 输入设备 输出设备组成 病毒 隐蔽性 破坏性 寄生性 物联网 应用层 网络层 感知层
如图快捷键
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Document</title> <style type="text/css"> * { padding: 0; margin: 0; } li { list-style: none; } div { box-sizing: border-box; } .min-content { width: 980px; margin: 0 auto; } .content { width: 1280px; margin: 0 auto; } .header { height: 120px; line-height: 120px; background: #fff; } .header .logo { float: left; height: 80px; margin-top: 20px; } .header .goto { float: right; color: #666; } .header .goto a { color: #666; text-decoration: none; } .navbox { height: 60px; background: #404042; line-height: 60px; color: #fff; font-size: 18px; } .navbox ul li { padding: 0 42px; float: left; } .navbox ul li:hover { background-color: #DA5454; } .banner img { width: 100%; } .function ul { display: flex; } .function ul li { padding: 34px 0; flex: 1 0 0; border: 1px solid #ddd; border-top: 0; border-spacing: 0; } .function .item img { height: 50px; margin: 0 15px 0 28px; float: left; } .function .item .info .title { font-size: 17px; } .function .item .info .subtitle { font-size: 14px; color: #666; } .demobox,.newsbox { margin-top: 10px; } .demobox ul .item { float: left; margin: 3px 8px; } .demobox .title,.newsbox .title { line-height: 56px; border-bottom: 1px solid #ddd; margin-bottom: 10px; color: #222; font-size: 18px; } .newsbox .itemtitle { font-size: 15px; color: #444; } .newsbox>ul { display: flex; gap: 15px; } .newsbox>ul .listbox { flex: 1 0 0; border: 1px solid #ddd; padding: 25px 20px; } .newsbox>ul .listbox .itemtitle { margin-bottom: 5px; } .newsbox>ul .listbox ul .item { border-bottom: 1px solid #ddd; padding: 20px 0; } .newsbox>ul .listbox ul .item img { float: left; margin-right: 15px; } .newsbox>ul .listbox ul .item .infotitle { font-size: 16px; color: #222; } .newsbox>ul .listbox ul .item .subtitle { font-size: 13px; color: #aaa; } .footer { padding: 46px; margin-top: 20px; background-color: #111; text-align: center; color: #fff; line-height: 36px; font-size: 15px; } </style> </head> <body> <div class="content"> <div class="min-content"> <div class="header"> <img class="logo" src="./images/logo.png" alt="logo"> <div class="goto"> <a href="#">登录</a> | <a href="#">注册</a> </div> </div> </div> <div class="navbox"> <div class="min-content"> <ul> <li class="item">首页</li> <li class="item">设计案例</li> <li class="item">装修图库</li> <li class="item">有问必答</li> <li class="item">逛商品</li> </ul> </div> </div> <div class="banner"> <img src="./images/banner.jpg" alt="banner"> </div> <div class="function min-content"> <ul> <li class="item"> <img src="./images/pic01.jpg" alt=""> <div class="info"> <p class="title">浏览真实设计案例</p> <p class="subtitle">设计师原创作品</p> </div> </li> <li class="item"> <img src="./images/pic02.jpg" alt=""> <div class="info"> <p class="title">浏览真实设计案例</p> <p class="subtitle">设计师原创作品</p> </div> </li> <li class="item"> <img src="./images/pic03.jpg" alt=""> <div class="info"> <p class="title">浏览真实设计案例</p> <p class="subtitle">设计师原创作品</p> </div> </li> <li class="item"> <img src="./images/pic04.jpg" alt=""> <div class="info"> <p class="title">浏览真实设计案例</p> <p class="subtitle">设计师原创作品</p> </div> </li> </ul> </div> <div class="demobox min-content"> <h4 class="title">设计案例</h4> <ul> <li class="item"> <img src="./images/pic05.jpg" alt=""> </li> <li class="item"> <img src="./images/pic06.jpg" alt=""> </li> <li class="item"> <img src="./images/pic07.jpg" alt=""> </li> <li class="item"> <img src="./images/pic08.jpg" alt=""> </li> <li class="item"> <img src="./images/pic09.jpg" alt=""> </li> <li class="item"> <img src="./images/pic10.jpg" alt=""> </li> </ul> </div> <div class="newsbox min-content"> <h4 class="title">最新动态</h4> <ul> <li class="listbox"> <h3 class="itemtitle">有问必答</h3> <ul class=""> <li class="item"> <img src="./images/pic01.png" alt=""> <div class="info"> <p class="infotitle">家具用品哪个品牌好</p> <p class="subtitle">回答:谢美家居用品很多错...</p> </div> </li> <li class="item"> <img src="./images/pic02.png" alt=""> <div class="info"> <p class="infotitle">家具用品哪个品牌好</p> <p class="subtitle">回答:谢美家居用品很多错...</p> </div> </li> <li class="item"> <img src="./images/pic03.png" alt=""> <div class="info"> <p class="infotitle">家具用品哪个品牌好</p> <p class="subtitle">回答:谢美家居用品很多错...</p> </div> </li> </ul> </li> <li class="listbox"> <h3 class="itemtitle">发布需求</h3> <ul class=""> <li class="item"> <img src="./images/pic04.png" alt=""> <div class="info"> <p class="infotitle">家具用品哪个品牌好</p> <p class="subtitle">回答:谢美家居用品很多错...</p> </div> </li> <li class="item"> <img src="./images/pic05.png" alt=""> <div class="info"> <p class="infotitle">家具用品哪个品牌好</p> <p class="subtitle">回答:谢美家居用品很多错...</p> </div> </li> <li class="item"> <img src="./images/pic06.png" alt=""> <div class="info"> <p class="infotitle">家具用品哪个品牌好</p> <p class="subtitle">回答:谢美家居用品很多错...</p> </div> </li> </ul> </li> <li class="listbox"> <h3 class="itemtitle">预约设计师</h3> <ul class=""> <li class="item"> <img src="./images/pic06.png" alt=""> <div class="info"> <p class="infotitle">家具用品哪个品牌好</p> <p class="subtitle">回答:谢美家居用品很多错...</p> </div> </li> <li class="item"> <img src="./images/pic07.png" alt=""> <div class="info"> <p class="infotitle">厨房在哪个方位风水好</p> <p class="subtitle">回答:看风水要结合...</p> </div> </li> <li class="item"> <img src="./images/pic08.png" alt=""> <div class="info"> <p class="infotitle">卧室多大比较合适</p> <p class="subtitle">回答:一般卧室的大小...</p> </div> </li> </ul> </li> </ul> </div> </div> <div class="footer"> <p>关于我们 | 联系我们 | 意见建议 | 帮助中心 | 使用条款</p> <p>免责声明:本网站部分内容由用户自行上传,如权利人发现存在误传其作品情形,请及时与本站联系。</p> </div> </body> </html>
import random def create(): randomArr = [] while len(randomArr) < 6: randNumber = random.randint(1,33) if not randNumber in randomArr: randomArr.append(randNumber) randomArr.append(random.randint(1,16)) return randomArr def getUserInput(): userInput = [] while len(userInput) < 6: red_input = input("请输入第%d个红色球号码: " % (len(userInput)+1)) if red_input.isdigit(): red_input = int(red_input) if red_input >=1 and red_input <= 33: if not red_input in userInput: userInput.append(red_input) else: print("这个号码已经被选过了") else: print("请输入1-33之间的红球号码") else: print("请输入正确的号码") while len(userInput) < 7: blue_input = input("请输入蓝色球号码: ") if blue_input.isdigit(): blue_input = int(blue_input) if blue_input >=1 and blue_input <= 16: userInput.append(blue_input) else: print("请输入1-16之间的蓝球号码") else: print("请输入正确的号码") return userInput def getRedCount(arr,userInput): redCount = 0 for i in range(len(arr)): if arr[i] == userInput[i]: redCount += 1 return redCount def getBlueCount(arr,userInput): blueCount = 0 if arr[len(arr)-1] == userInput[len(userInput)-1]: blueCount = 1 return blueCount def getResult(redCount, blueCount): if(redCount == 6 and blueCount == 1): return "一等奖,中奖1000万" elif(redCount == 6 and blueCount == 0): return "二等奖,中奖500万" elif(redCount == 5 and blueCount == 1): return "三等奖,中奖3000" elif((redCount == 5 and blueCount == 0) or (redCount == 4 and blueCount == 1)): return "四等奖,中奖200元" elif((redCount == 4 and blueCount == 0) or (redCount == 3 and blueCount == 1) or (redCount == 2 and blueCount == 1)): return "五等奖,中奖10元" elif((redCount == 1 and blueCount == 0) or blueCount == 1): return "六等奖,中奖5元" return "未中奖" #创建中奖号码 arrNumber = create() #得到用户输入 userInput = getUserInput() #计算红球中奖个数 redCount = getRedCount(arrNumber,userInput) print("红球中奖个数: ",redCount) #计算蓝球中奖个数 blueCount = getBlueCount(arrNumber,userInput) print("蓝球中奖个数: ",blueCount) #最终结果 result = getResult(redCount, blueCount) print("中奖号码为",arrNumber) print("你输入的号码为",userInput) print(result)
在component目录下新建一个子组件 然后在父界面使用import绑定子界面: import child from "../../component/child.vue" child 是子组件名,from后面连接组件路径 然后使用components绑定组件: components: { child } 父传子参数可以通过标签属性传递: <child :content="content"></child> 子组件接收方法: props: ["content"] 子组件传递参数给父组件: 可以使用this.$emit通过事件的方式传递参数: but:function() { this.$emit("buts",this.putInfo); } buts 父组件接收的事件名, putInfo 是传递的参数 父组件通过标签属性的方式得到传递的参数: <child @buts="buts"></child> 夫组件通过buts事件接收 约束传递的参数: props: { content:{ type: [Number,String], } } 允许Number类型和String类型
基本的逻辑比较运算符在前面笔记说过了 链接:http://notei.cn/note_see/64 这里主要是讲 与运算 或运算 非运算 学过一点电子逻辑门都应该有点概念的 与运算在C语言中用的符号是 "&&" 实际用法就是: if(10>=5 && 6<=5),顾名思义与逻辑就是要让两个逻辑同时为真最后才能返回真条件,反之就是假条件。 最后会返回的结果为0,为什么10>=5明明是真条件为什么会等于0呢?是因为6<=5是假条件导致整个运算结果也为假条件。 也可以多个条件一起进行运算if(1==1&&2==2&&3==3)多个条件一起运算也是可以的,如果三个条件都为真,那么最后会返回一个真条件,反之假条件。 或逻辑运算方式为只要有一个条件为真,那么最后就会返回真条件。反之全部为假条件,最后也只能返回假条件。符号为 "||" 用法为:if(1==1||2==3)。 非逻辑就是在条件的前面加一个 "!" 也就是小写的感叹号,让最后的逻辑取反。如果逻辑为真后加一个"!"条件将会变成假条件,反之为真。
//StringBuilder类型示例 public class demo3 { public static void main(String[] args) { //StringBuilder 定义的数据是可改变的 //String 定义的数据是不可改变的,每次覆盖都会产生新的变量 StringBuilder strb1 = new StringBuilder("1123"); //必须使用new方法进行赋值,数据存储在堆中 strb1.append("abc"); //使用append在str1后面添加新的数据,类似一个伪数组同样可以通过charAt的方式访问索引 System.out.println(strb1.charAt(5)); //返回5索引的字符 System.out.println(strb1); StringBuilder strb2 = new StringBuilder("ceshi123"); strb2.reverse(); //容器内的数据进行翻转 String str = strb2.toString(); //StringBuilder类型转为String类型,返回String类型数据 System.out.println(strb2); System.out.println(str); } }
//使用截取隐藏手机号中间部分 public class demo1 { public static void main(String[] args) { String phone = "18153468453"; String start = phone.substring(0,4); String end = phone.substring(7); String newPhone = start + "****" + end; System.out.println(newPhone); } }
//final修饰的方法: 表明方法是最终方法,不能被重写 //final修饰的类: 表面类是最终类,不能被继承 //final修饰的变量: 表面变量为常量,不能在程序中被重新赋值 public class Test { public static void main(String[] args) { Zi z = new Zi(); Fu f = new Fu(); z.getPi(); //调用Fu类中无法被重写的getPi方法 System.out.println("=========================="); z.sum(5,6); //调用子类中被重写的sum方法 System.out.println("=========================="); //变量使用final修饰后无法被修改,变成常量,常量单词一般全大写组成。单词之间使用下划线隔开 //常量类型为基本数据类型时,记录的值不能发生改成。byte、char、short、int、long、float、double、boolean //常量类型为引用数据类型时,记录的地址值不能发生改变,内部的属性值可以改变。 //如对象使用final修饰后,还是可以调用set方法修改对象中的属性 final int A = 10; // A = 12; //报错,因为A是常量。无法修改,在定义时就必须完成赋值 System.out.println(A); } } class Fu { public final void getPi() { System.out.println("我是被final修饰的getPi方法,位于Fu类中"); System.out.println("3.14159265358979323846"); } public void sum(int a, int b) { System.out.println("我是没被final修饰的sum方法,位于Fu类中"); System.out.println(a+b); } } class Zi extends Fu { //sum方法没有被final修饰,可以被重写 @Override public void sum(int a, int b) { System.out.println("我是没被final修饰的sum方法,位于Zi类中"); System.out.println(a+b); } //getPi方法被final修饰,不能被重写,报错 // @Override // public final void getPi() { // System.out.println("我是被final修饰的getPi方法,位于Fu类中"); // System.out.println("3.14159265358979323846"); // } }
ASCII 打印字符 (字符编码: 32-127) 32~126(共95个)是字符:32是空格,其中48~57为0到9十个阿拉伯数字,65~90为26个大写英文字母,97~122号为26个小写英文字母,其余为一些标点符号、运算符号等。第127个字符表示的是键盘上的删除命令。 32-127ASCII码对应值在下方
正则表达式基本的规则图 图片来自黑马程序员课程
//多态的其他使用 public class Test { public static void main(String[] args) { //a变量数据类型为Animal,是Dog类的父类型 //方法调用时: 编译看左边,运行看右边 //意思是进行编译函数的时候会先在左边的类型(Animal)中查找是否有这个方法,如果有再到右边的类型(Dog)中运行被重构的方法,如果未找到方法就会报错 //因为方法编译看左边的特性,如果调用方法时,左边类中没有,而右边类中有这个方法。因为编译看的是左边的类,所以右边的方法也无法被找到 Animal a = new Dog(); a.show(); //调用Dog中被重写的show方法 // a.eat(); 报错的代码,因为编译时在左边的Animal类中未发现这个方法 Animal b = new Cat(); b.show(); //调用Cat中被重写的show方法 //变量调用时: 编译看左边,运行也看左边 //如果左边的类中没有这个变量,那么这个变量将无法被找到 System.out.println(a.a); //a变量在Animal中可以被找到并编译,正常输出100 // System.out.println(a.b); //b变量在右边的Dog类中,无法被找到无法被编译,报错 System.out.println(b.a); ////a变量在Animal中可以被找到并编译,正常输出100 //======================================================================= //解决方法也很简单,直接转换为子类的数据类型即可 Dog d = (Dog) a; Cat c = (Cat) b; d.eat(); c.eat(); } } class Animal { //动物类 private String type = "动物"; int a = 100; public Animal() { } public Animal(String type) { this.type = type; } public String getType() { return type; } public void setType(String type) { this.type = type; } public void show() { System.out.println("动物类型为" + this.type); } } class Dog extends Animal { int b = 200; public Dog() { super("狗狗"); //调用父类构造函数 } public void eat() { System.out.println(super.getType() + "正在吃骨头"); } @Override public void show() { System.out.println("动物类型为" + super.getType()); } } class Cat extends Animal { int c = 300; public Cat() { super("猫猫"); //调用父类构造函数 } public void eat() { System.out.println(super.getType() + "正在吃猫粮"); } @Override public void show() { System.out.println("动物类型为" + super.getType()); } }
Java数组创建方式 完整格式:数据类型[] 数组名 = new 数据类型[] {数组内容} 比如:int[] arr1 = new int[] {12,34,532}; 这样就定义了一个完整的数组格式 另外也可以用简写:int[] arr1 = {12,34,532}; 另外还有动态初始化的方式创建数组 完整格式:数据类型[] 数组名 = new 数据类型[数组类型] 比如:int[] arr1 = new int[3]; arr1[0] = 13; arr1[1] = 14; arr1[2] = 15; 先将数组动态创建完成,后期再进行输入录入 详细点的讲解可以看:http://notei.cn/user/note_see/60
<?php /** * 功能:PDO连接数据库操作函数封装 */ class PDO_SQL { public function __construct($pdo_config) { $sql_info="{$pdo_config['dbms']}:host={$pdo_config['host']};dbname={$pdo_config['db']}"; try { $this->pdo_connect = new PDO($sql_info, $pdo_config['user'], $pdo_config['pwd']); } catch (PDOException $e) { die ("Error!: " . $e->getMessage()); } #PDO连接数据库 } public function PDO_get_array($sql_code,$parameter=[]){ /* $sql_code - SQL语句 $parameter - 预处理参数 */ $stmt = ($this->pdo_connect)->prepare($sql_code); $stmt->execute($parameter); $row = $stmt->fetch(PDO::FETCH_ASSOC); return $row; } #获取一条数据返回数组 public function PDO_input_prepare($sql_code,$parameter=[],$mod=0){ /* $sql_code - SQL语句 $parameter - 预处理参数 $mod - 处理模式 */ $stmt = ($this->pdo_connect)->prepare($sql_code); $stmt->execute($parameter); if($mod == 1) { #预处理:执行SQL语句 return $stmt->rowCount(); }else{ #预处理:获取数据列表 $list = null; while($row = $stmt->fetch(PDO::FETCH_ASSOC)) $list[] = $row; if(is_array($list)){ return $list; }else{ return "Empty Data"; } } } #sql预处理函数 } ?> PDO_get_array -- 获取一条数据返回数组 PDO_input_prepare -- sql预处理函数:发送命令与获取列表
一维数组定义方式为: int a[] = {0,1,2,3,4,5,...}; 或 int a[3] = {0,1,2}; 第一种定义方式没有指定元素数量,第二种固定三个元素进行传参,如果int a[4] = {0,1,2};,那么第四个元素默认是0 二维数组定义方式为: int a[][] = { {1,2,3}, {4,5,6}, {7,8,9} }; int a[][] 代表的是 要定义一个二维数组,=后面的值为二维数组的内容 a[0]输出结果为数组{1,2,3},a[1]输出结果为数组{4,5,6},那么a[0][1]输出为1,a[1][1]输出为4,a[1][1]输出为5 ----------以上是我觉得的---------- 和我学的PHP JS等语言不太一样的数组处理方式,深层逻辑我也不懂。 就以我学的PHP来说,PHP的数组定义: $a = []; 就是定义一个空数组 $a[] = 123; 就是将变量a数组的首个元素指定为123 $a[] = 123;$a[] = 456;将0键值的数据指定为123,将1键值的数据指定为456 --上面是PHP定义一维数组的基本方法-- PHP二维数组的定义方式和C语言也有一样的地方: $a = [ [1,2,3], [4,5,6], [7,8,9] ]; 定义和C语言一样的二维数组 当然也有不一样的地方: $a[0] = [0,1,2]; $a[1] = [3,4,5]; $a[2] = [6,7,8]; 这样定义出来也是一样的二维数组 ----------下面为我个人理解---------- 首先C语言的int a[][] = {{},{}}格式和PHP的$a = [[],[],[]]类似 int a[][] 代表的是 告诉系统要定义一个二维数组,=后面的值为二维数组的内容 而PHP可以直接指定一维数组的键值等于另外一个数组,从而达到二维数组的定义 只是自己做个笔记理解一下两个语言的数组定义方式以及不同,C我也是刚学不久不是很理解,就先写个笔记记录一下了
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Document1</title> <style> * { padding: 0; margin: 0; } li { list-style: none; } a { color: #666; text-decoration: none; } .content { width: 1280px; margin: 0 auto; } .nav { height: 600px; background: url("images/bg.png") center; background-size: cover; } .navlist { padding: 30px 60px; box-sizing: border-box; text-align: center; } .navlist ul li { float: left; line-height: 60px; padding: 0 50px; font-size: 16px; } .seach { position: relative; width: 128px; height: 36px; margin-top: 12px; } .seach img { height: 16px; position: absolute; top: calc(50% - 8px); left: 10px; z-index: 10; } .seach .input { position: absolute; top: 0; left: 0; height: 100%; width: 100%; border: none; border-radius: 18px; font-size: 12px; padding-left: 32px; box-sizing: border-box; outline: none; color: #666 } .hot { text-align: center; margin-top: 20px; } .hotlist { margin-top: 20px; text-align: left; padding: 0 60px; box-sizing: border-box; } .hotlist .item .img img { width: 100%; } .hotlist .item .title { padding: 10px; box-sizing: border-box; font-weight: bold; font-size: 18px; color: #333; border-bottom: 1px solid #ddd; } .hotlist .item .info { padding: 10px; padding-bottom: 30px; color: #bbb; box-sizing: border-box; } .hotlist { display: flex; gap: 80px; } .bottomimage img { width: 100%; } .life { background-color: #E1EBF2; margin-top: 50px; text-align: center; padding: 30px 0; } .life ul { text-align: center; } .life ul li { display: inline-block; margin: 20px 20px; } .footer { height: 80px; background: url("images/footer_bg.jpg"); color: #fff; text-align: center; line-height: 80px; margin-top: 50px; } </style> </head> <body> <div class="content"> <div class="nav"> <div class="navlist"> <ul> <li> <img class="logo" src="./images/logo.png" alt=""> </li> <li><a href="#">网站首页</a></li> <li><a href="#">床和床垫</a></li> <li><a href="#">卧室纺织品</a></li> <li><a href="#">灯具照明</a></li> <li class="seach"> <img src="./images/f.png" alt=""> <input class="input" type="text" placeholder="输入商品名称"> <li> </ul> </div> </div> <div class="hot"> <img src="./images/dongtai.jpg" alt=""> <ul class="hotlist"> <li class="item"> <dt class="box"> <dd class="img"> <img src="./images/news1.jpg" alt=""> </dd> <dd class="title">BEST贝达</dd> <dd class="info">将杂乱无章的物品收纳到视线之外,在我怕门后要展示台的心爱之物!</dd> <dd class="bottomimage"><img src="./images/yinying.jpg" alt=""></dd> </dt> </li> <li class="item"> <dt class="box"> <dd class="img"> <img src="./images/news2.jpg" alt=""> </dd> <dd class="title">BEST贝达</dd> <dd class="info">将杂乱无章的物品收纳到视线之外,在我怕门后要展示台的心爱之物!</dd> <dd class="bottomimage"><img src="./images/yinying.jpg" alt=""></dd> </dt> </li> <li class="item"> <dt class="box"> <dd class="img"> <img src="./images/news3.jpg" alt=""> </dd> <dd class="title">BEST贝达</dd> <dd class="info">将杂乱无章的物品收纳到视线之外,在我怕门后要展示台的心爱之物!</dd> <dd class="bottomimage"><img src="./images/yinying.jpg" alt=""></dd> </dt> </li> </ul> </div> <div class="life"> <img src="./images/shenghuo.png" alt=""> <ul> <li><img src="./images/img1.jpg" alt=""></li> <li><img src="./images/img2.jpg" alt=""></li> <li><img src="./images/img3.jpg" alt=""></li> </ul> </div> </div> <div class="footer"> 爱家居版权所有2016-2026京ICP备222222222号 京公网安备2222222222222 </div> </body> </html>
#include <REGX52.H> //????: sbit LCD_RS=P2^6; sbit LCD_RW=P2^5; sbit LCD_EN=P2^7; #define LCD_DataPort P0 //????: /** * @brief LCD1602????,12MHz?????1ms * @param ? * @retval ? */ void LCD_Delay() { unsigned char i, j; i = 2; j = 239; do { while (--j); } while (--i); } /** * @brief LCD1602??? * @param Command ?????? * @retval ? */ void LCD_WriteCommand(unsigned char Command) { LCD_RS=0; LCD_RW=0; LCD_DataPort=Command; LCD_EN=1; LCD_Delay(); LCD_EN=0; LCD_Delay(); } /** * @brief LCD1602??? * @param Data ?????? * @retval ? */ void LCD_WriteData(unsigned char Data) { LCD_RS=1; LCD_RW=0; LCD_DataPort=Data; LCD_EN=1; LCD_Delay(); LCD_EN=0; LCD_Delay(); } /** * @brief LCD1602?????? * @param Line ???,??:1~2 * @param Column ???,??:1~16 * @retval ? */ void LCD_SetCursor(unsigned char Line,unsigned char Column) { if(Line==1) { LCD_WriteCommand(0x80|(Column-1)); } else if(Line==2) { LCD_WriteCommand(0x80|(Column-1+0x40)); } } /** * @brief LCD1602????? * @param ? * @retval ? */ void LCD_Init() { LCD_WriteCommand(0x38);//??????,????,5*7?? LCD_WriteCommand(0x0c);//???,???,??? LCD_WriteCommand(0x06);//???????,??????,???? LCD_WriteCommand(0x01);//????,?? } /** * @brief ?LCD1602??????????? * @param Line ???,??:1~2 * @param Column ???,??:1~16 * @param Char ?????? * @retval ? */ void LCD_ShowChar(unsigned char Line,unsigned char Column,char Char) { LCD_SetCursor(Line,Column); LCD_WriteData(Char); } /** * @brief ?LCD1602????????????? * @param Line ?????,??:1~2 * @param Column ?????,??:1~16 * @param String ??????? * @retval ? */ void LCD_ShowString(unsigned char Line,unsigned char Column,char *String) { unsigned char i; LCD_SetCursor(Line,Column); for(i=0;String[i]!='\0';i++) { LCD_WriteData(String[i]); } } /** * @brief ???=X?Y?? */ int LCD_Pow(int X,int Y) { unsigned char i; int Result=1; for(i=0;i<Y;i++) { Result*=X; } return Result; } /** * @brief ?LCD1602???????????? * @param Line ?????,??:1~2 * @param Column ?????,??:1~16 * @param Number ??????,??:0~65535 * @param Length ????????,??:1~5 * @retval ? */ void LCD_ShowNum(unsigned char Line,unsigned char Column,unsigned int Number,unsigned char Length) { unsigned char i; LCD_SetCursor(Line,Column); for(i=Length;i>0;i--) { LCD_WriteData(Number/LCD_Pow(10,i-1)%10+'0'); } } /** * @brief ?LCD1602??????????????????? * @param Line ?????,??:1~2 * @param Column ?????,??:1~16 * @param Number ??????,??:-32768~32767 * @param Length ????????,??:1~5 * @retval ? */ void LCD_ShowSignedNum(unsigned char Line,unsigned char Column,int Number,unsigned char Length) { unsigned char i; unsigned int Number1; LCD_SetCursor(Line,Column); if(Number>=0) { LCD_WriteData('+'); Number1=Number; } else { LCD_WriteData('-'); Number1=-Number; } for(i=Length;i>0;i--) { LCD_WriteData(Number1/LCD_Pow(10,i-1)%10+'0'); } } /** * @brief ?LCD1602????????????????? * @param Line ?????,??:1~2 * @param Column ?????,??:1~16 * @param Number ??????,??:0~0xFFFF * @param Length ????????,??:1~4 * @retval ? */ void LCD_ShowHexNum(unsigned char Line,unsigned char Column,unsigned int Number,unsigned char Length) { unsigned char i,SingleNumber; LCD_SetCursor(Line,Column); for(i=Length;i>0;i--) { SingleNumber=Number/LCD_Pow(16,i-1)%16; if(SingleNumber<10) { LCD_WriteData(SingleNumber+'0'); } else { LCD_WriteData(SingleNumber-10+'A'); } } } /** * @brief ?LCD1602???????????????? * @param Line ?????,??:1~2 * @param Column ?????,??:1~16 * @param Number ??????,??:0~1111 1111 1111 1111 * @param Length ????????,??:1~16 * @retval ? */ void LCD_ShowBinNum(unsigned char Line,unsigned char Column,unsigned int Number,unsigned char Length) { unsigned char i; LCD_SetCursor(Line,Column); for(i=Length;i>0;i--) { LCD_WriteData(Number/LCD_Pow(2,i-1)%2+'0'); } } 调用函数显示具体内容即可 .h文件老样子在贴图里面
ASCII 控制字符 (字符编码: 0-31) 在ASCII码表中,前32个字符是不能用于打印控制的编码,而是用于控制像打印机一样的外围设备。 0-31ASCII码对应值在下方
<!DOCTYPE html> <html> <head> <meta charset="utf-8"/> <title>demo1</title> <style> * { margin: 0; padding: 0; font-size: 14px; } li { list-style: none; margin-top: 10px; } .box { width: 980px; margin: auto; padding: 0 20px; margin-top: 20px; box-sizing: border-box; } .logo-nav { width: 148px; } .nav { padding-bottom: 10px; border-bottom: 3px solid #1678be; } .nav .logo { float: left; } .nav .nav-text { float: right; } .nav-text a { color: #000; text-decoration: none; } .info-box { height: 440px; width: 100%; margin-top: 20px; } .info-box .logo-swiper { width: 100%; } .info-box .right .title-h1 { text-align: center; } .info-box .right .info { padding: 10px; font-size: 16px; box-sizing: border-box; overflow: auto; } .comment-box .item { height: 105px; margin-top: 20px; position: relative; padding: 10px; box-sizing: border-box; border-bottom: 1px solid #ddd; } .comment-box .portrice { position: absolute; width: 62px; } .comment-box .userInfo { position: absolute; left: 80px; } .comment-box .userInfo .userName { display: inline-block; color: darkorange; font-size: 17px; } .comment-box .userInfo .date { display: inline-block; margin-left: 30px; font-size: 14px; color: #999; } .comment-box .text { position: absolute; left: 80px; top: 50px; height: 20px; font-size: 14px; } .comment-box .from { position: absolute; left: 80px; top: 70px; color: coral; font-size: 14px; } .new-film-box { margin-bottom: 15px; } .film-list .item img { float: left; margin-right: 10px; width: 10%; } .hot-film-box { margin-bottom: 20px; border-bottom: 3px solid #2FA2ED; padding-bottom: 20px; } .hot-film-box .left { float: left; width: 600px; } .hot-film-box .right { float: right; width: 200px; height: 100%; } .hot-film-box .right img { width: 100%; } .hot-film-box .left .info { margin-top: 15px; line-height: 20px; } .bottom-box { text-align: center; border-top: 1px solid #ddd; box-sizing: border-box; padding: 15px 100px; } .b-nav a { text-decoration: none; } .bottom-box .tip { margin-top: 12px; line-height: 28px; } .red { color: red; } .blue { color: blue; } .italic { font-style: italic; } </style> </head> <body> <div class="box"> <div class="nav"> <img class="logo-nav" src="./images/logo.jpg" alt="LOGO"> <div class="nav-text"> <a href="#">电影世界首页 |</a> <a href="#">登录 |</a> <a href="#">注册 |</a> <a style="color: red;" href="#">收藏</a> </div> </div> <div class="info-box"> <img class="logo-swiper" src="./images/banner.jpg" alt="首页图片"> <div style="clear: both;"></div> </div> <div class="new-film-box"> <h2 style="font-size: 17px;" class="title">最新电影</h2> <div style="border: 2px solid #2FA2ED;margin: 10px 0 5px 0"></div> <ul class="film-list"> <li class="item"> <img src="./images/img_01.jpg" /> </li> <li class="item"> <img src="./images/img_02.jpg" /> </li> <li class="item"> <img src="./images/img_03.jpg" /> </li> <li class="item"> <img src="./images/img_04.jpg" /> </li> <li class="item"> <img src="./images/img_05.jpg" /> </li> <li class="item"> <img src="./images/img_06.jpg" /> </li> <li class="item"> <img src="./images/img_07.jpg" /> </li> <li class="item"> <img src="./images/img_08.jpg" /> </li> <li class="item"> <img src="./images/img_09.jpg" /> </li> </ul> <div style="clear:both;"></div> </div> <div class="hot-film-box"> <h2 style="font-size: 17px;" class="title">热门电影介绍</h2> <div style="border: 2px solid #ddd;margin: 10px 0 5px 0"></div> <div class="film-info"> <div class="left"> <div class="top-info"> <a style="color: red;" href="#">西游降魔篇</a> <a href="#">高清视频在线观看</a> <a href="#">爱奇艺</a> </div> <div class="info"> <p>上映时间:2013年2月10日<br> 导演:<span class="red">周星驰 郭子健</span><br> 发行公司:安乐影片<br> <span class="blue">主演:</span><a href="#">黄渤</a> <a href="#">文章</a> <a href="#">舒淇</a> <a href="#">周秀娜</a> <a href="#">释行宇</a> <a href="#">罗志祥</a> <a href="#">何文辉</a> <a href="#">李尚正</a><br> 片长:110分钟<br> <span class="red italic">类型:冒险 奇幻 喜剧</span><br> 定价:<span class="red">150元</span><br> 简介 :受气的唐僧、暴戾的孙悟空、帅气的猪八戒、妩媚的沙僧,完全颠覆 版西游记,周星驰时隔15年自编自导再战西游。 这是个妖魔横行的世界,百 姓苦不堪言。年轻的驱魔人玄奘以“舍小我,成大我”的大无畏精神,历尽 艰难险阻,依次收复水妖、猪妖以及妖王之王孙悟空为徒,并用“爱”将他 们感化......</p> </div> </div> <div class="right"> <img src="./images/moviebanner.jpg"> </div> <div style="clear: both;"></div> </div> </div> <div class="comment-box"> <img class="comment-icon" src="./images/comment.jpg" /> <div style="height: 2px;background:#ddd;margin-top:5px;"></div> <ul class="comment-list"> <li class="item"> <img class="portrice" src="./images/pic01.jpg" /> <div class="content-box"> <div class="userInfo"> <p class="userName">影迷无敌001</p> <p class="date">2020-1-2 15:38:37</p> </div> <p class="text">请剧情党们不要太较真电影对魔兽历史的更改,毕竟翻拍的电影,多少会有些出入,我们看的是情怀,哈哈。。。</p> <p class="from">来自:大众点评网友</p> </div> </li> <li class="item"> <img class="portrice" src="./images/pic02.jpg" /> <div class="content-box"> <div class="userInfo"> <p class="userName">时光不老</p> <p class="date">2015-3-2 15:05:37</p> </div> <p class="text">个人认为小时代毫无看点,看了不到半小时就要睡着了,我已无力吐槽,建议大家还是去读原著吧!!! </p> <p class="from">来自:星光影院网友</p> </div> </li> <li class="item"> <img class="portrice" src="./images/pic03.jpg" /> <div class="content-box"> <div class="userInfo"> <p class="userName">cocoke</p> <p class="date">2016-2-14 10:38:36</p> </div> <p class="text">星爷的每一部电影都很经典,重复地看过很多遍,每次都有更深刻的理解和更深的感悟,同样期待《美人鱼》。 来自:美团网网友</p> <p class="from">来自:美团网网友</p> </div> </li> </ul> </div> <div class="bottom-box"> <p class="b-nav"> <a href="#"> 公司简介 |</a> <a href="#"> 关于我们 |</a> <a href="#"> 联系我们 |</a> <a href="#"> 友情链接 |</a> <a href="#"> 招聘信息 |</a> <a href="#"> 产品答疑</a> </p> <p class="tip"><span class="red">免责声明:</span>本网站内容收集于互联网,电影时光网不承担任何由于内容的合法性及健康性所引起的争议和法律责任。欢迎大家对网站内容侵犯版权等不合法和不健康行为进行监督和举报。</p> </div> </div> </body> </html>
#include <REGX52.H> char key_16(){ unsigned char KeyNumber = 0; /*第一列*/ P1 = 0xF7; switch(P1){ case 0x77: while(P1 == 0x77); KeyNumber = 1; break; case 0xB7: while(P1 == 0xB7); KeyNumber = 5; break; case 0xD7: while(P1 == 0xD7); KeyNumber = 9; break; case 0xE7: while(P1 == 0xE7); KeyNumber = 13; break; } /*第二列*/ P1 = 0xFB; switch(P1){ case 0x7B: while(P1 == 0x7B); KeyNumber = 2; break; case 0xBB: while(P1 == 0xBB); KeyNumber = 6; break; case 0xDB: while(P1 == 0xDB); KeyNumber = 10; break; case 0xEB: while(P1 == 0xEB); KeyNumber = 14; break; } /*第三列*/ P1 = 0xFD; switch(P1){ case 0x7D: while(P1 == 0x7D); KeyNumber = 3; break; case 0xBD: while(P1 == 0xBD); KeyNumber = 7; break; case 0xDD: while(P1 == 0xDD); KeyNumber = 11; break; case 0xED: while(P1 == 0xED); KeyNumber = 15; break; } /*第四列*/ P1 = 0xFE; switch(P1){ case 0x7E: while(P1 == 0x7E); KeyNumber = 4; break; case 0xBE: while(P1 == 0xBE); KeyNumber = 8; break; case 0xDE: while(P1 == 0xDE); KeyNumber = 12; break; case 0xEE: while(P1 == 0xEE); KeyNumber = 16; break; } return KeyNumber; }
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <title>Document</title> <style> body { background-color: #EBEBEB; } .content { background: url("images/form_bg.jpg"); width: 1430px; height: 717px; margin: 0 auto; position: relative; } .frombox { width: 700px; height: 540px; position: absolute; top: 160px; left: 700px; } .title { text-align: center; font-size: 24px; } .line { padding: 7px 0; font-size: 15px; } .line input { height: 26px; width: 220px; } .line .tip { text-align: right; display: inline-block; width: 90px; } .line.color input { width: 120px; } .line.btn input { background-color: #93B518; color: #fff; width: 120px; height: 36px; border: 0; margin: 15px 28px; } </style> </head> <body> <div class="content"> <div class="frombox"> <h1 class="title">传智学员信息登记表</h1> <form action="" method="GET"> <div class="line"> <label class="tip">用户登录名:</label> <input type="text" name="username" value="mymail@163.com" readonly="readonly" disabled="disabled"> <label>(不能修改,只能查看)</label> </div> <div class="line"> <label class="tip">真实姓名:</label> <input type="text" name="name" placeholder="例如:王鹏" required pattern="^[\u4e00-\u9fa5]+$"> <label>(必须填写,只能输入汉字)</label> </div> <div class="line"> <label class="tip">真实年龄:</label> <input type="number" name="age" min="0" max="100" value="24" required placeholder="16-100"> <label>(必须填写)</label> </div> <div class="line"> <label class="tip">出生日期:</label> <input type="date" name="date" required> <label>(必须填写)</label> </div> <div class="line"> <label class="tip">电子邮箱:</label> <input type="email" name="email" placeholder="123456@qq.com" required> <label>(必须填写)</label> </div> <div class="line"> <label class="tip">身份证号:</label> <input type="text" name="idcard" required pattern="^[0-9]{17}[0-9Xx]$"> <label>(必须填写,能够以数字,字母x结尾的短身份证号)</label> </div> <div class="line"> <label class="tip">手机号码:</label> <input type="tel" name="tel" required> <label>(必须填写)</label> </div> <div class="line"> <label class="tip">个人主页:</label> <input type="url" name="myurl" placeholder="http://bk.notei.cn"> <label>(请选择网址)</label> </div> <div class="line color"> <label class="tip">幸运颜色:</label> <input type="color" name="luckcolor" value="#E2D546"> <label>(请选择你喜欢的颜色)</label> </div> <div class="line btn"> <input type="submit" value="提交"> <input type="reset" value="重置"> </div> </form> </div> </div> </body> </html>
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Document2</title> <style> * { margin: 0; padding: 0; } .main-box { width: 980px; margin: 50px auto; } .title-box { background-color: #CFE2F0; padding: 0 20px; box-sizing: border-box; border: 1px solid #4188C3; } .title-box .title { color: #333; line-height: 48px; font-size: 18px; font-weight: normal; } .content { border: 1px solid #4188C3; height: 360px; display: flex; background: #F7FBFE; } .content .left { width: 100%; } .content .center { width: 100%; } .content .right { width: 120%; } .left img { width: 80%; height: 42%; margin-top: 5%; margin-left: 10%; border: 1px #ddd solid; } .center ul { padding: 30px 30px; box-sizing: border-box; } .center ul li { height: 180px; } .center .title { font-weight: bold; margin-bottom: 20px; } .center .sub-title { margin-bottom: 20px; font-size: 15px; color: #333; } .right { padding: 20px; box-sizing: border-box; line-height: 34px; font-size: 15px; } </style> </head> <body> <div class="main-box"> <div class="title-box"> <h3 class="title">通讯终端</h3> </div> <div class="content"> <div class="left"> <img src="./images/t2/p1.jpg" alt=""> <img src="./images/t2/p2.jpg" alt=""> </div> <div class="center"> <ul> <li> <p class="title">天价登场 诺基亚N97中文版上市价曝光</p> <p class="sub-title">尽管最夏普三款千万像素手机的隆重发布..</p> </li> <li> <p class="title">诺基亚停止生产WiMAX手机</p> <p class="sub-title">北京时间1月11日消息,据国外媒体报道,..</p> </li> </ul> </div> <div class="right"> <ul> <li>MTK完善3G布局 09年推出人才定制计划</li> <li>山寨机不能成为问题品牌机的替罪羊</li> <li>五大智能手机操作系统大对决</li> <li>短信利器 三星发布独特按键手机T349</li> <li>火拼N97 三星i8910 HD上市售5600元</li> <li>价格不低 索尼爱立信C901中文版将上市</li> <li>天价登场 诺基亚N97中文版上市价曝光</li> <li>轻松进入“街机”档 诺基亚5800现价2360元</li> <li>魔幻键盘音乐手机 摩托罗拉E8仅1478元 </li> </ul> </div> </div> </div> </body> </html>
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Document</title> <style> * { padding: 0; margin: 0; } li { list-style-type: none; } a { text-decoration: none; } .nav-box { width: 980px; height: 90px; margin: 20px auto; display: flex; align-items: center; } .right { flex: 1; margin-left: 20px; } .right-top-tag li { display: inline-block; font-size: 12px; border-radius: 3px 3px 0 0; overflow: hidden; } .right-top-tag li a { color: #666; padding: 5px 15px; display: inline-block; } .right-search { margin-top: -4px; display: flex; } .right-search input { border: 3px solid #F37B03; width: 100%; height: 27px; background: url("./images/tb/search.jpg") no-repeat 10px; flex: 1; outline: none; padding-left: 30px; color: #666; } .right-search .button { flex-shrink: 1; width: 133px; height: 33px; background: url("images/tb/button.jpg") no-repeat; border: none; } .right-search .tip { height: 33px; } .right-search .tip p { line-height: 16px; font-size: 12px; margin-left: 10px; color: #666; } .right-title-nav ul li { display: inline-block; margin-top: 6px; } .right-title-nav ul li a { color: #555; font-size: 12px; margin-right: 12px; } </style> </head> <body> <div class="nav-box"> <div class="left"> <img src="./images/tb/logo.jpg" alt=""> </div> <div class="right"> <div class="right-top-tag"> <ul> <li style="background-color: #F37B03;"><a style="color: #fff;" href="#"> 宝贝 </a></li> <li><a href="#"> 天猫<span style="color: #f79a3d;">(淘宝商城)</span> </a></li> <li><a href="#"> 店铺 </a></li> </ul> </div> <div class="right-search"> <input type="text"> <button class="button"></button> <div class="tip"> <p>高级搜索</p> <p>使用帮助</p> </div> </div> <div class="right-title-nav"> <ul> <li> <a href="#">长裙</a> </li> <li> <a href="#">时尚包包</a> </li> <li> <a href="#">新款连衣裙</a> </li> <li> <a href="#">中老年夏服</a> </li> <li> <a href="#">新款连衣裙</a> </li> <li> <a href="#">中老年夏服</a> </li> <li> <a href="#">更多>></a> </li> </ul> </div> </div> </div> </body> </html>
Python定义变量的方法为: name = "chumo" age = 19 也可以同时定义: name,age = "chumo",19 两种方法定义都是一样的结果 定义变量时不需要像c语言以及java那样先声明数据类型再写入变量内容。 Python常见的数据类型有: Number(数字) String(字符串) List(列表) Tuple(元组) Set(集合) Dictionary(字典)