问题 :表单的不完美
a、今天学习了表单 但是效果很是不理想 下面是自己找的表单练习 和效果图的对比
b、问:如何像效果图一样美丽?表单如何对齐?
c、代码区:
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Document</title> </head> <body> <form action="ok.html" align="center"> <p>* 会 员 名 <input type="text"></p> <p>*登录密码<input type="password"></p> <p>*重复密码<input type="password"></p> <p>*联系人姓名<input type="text"></p> <p>*企业名称<input type="text"></p> <p> *贸易身份 <input type="checkbox">我要销售 <input type="checkbox">我要采购 <input type="checkbox">两者都是 </p> <p> 电话号码 <select name="" id=""> <option value="" selected>中国大陆+86</option> <option value="">hello word</option> <option value="">hello word</option> <input type="text"> </select> </p> </form> </body> </html>
d、效果图:(自己做的效果图展示)
e、理想图:
问题一:
a、描述:表单之间不能套表单,那么表格里面是否可以套用表单 或者说表单里面是否可以套一个表格?
b、如果可以套用那么 表单的重置按钮是否可以达到清除表格里面已经填写的内容?是否有效?
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Title</title> <style> .box{ weight:1000px; height:600px; /*第一种写法*/ background-color: crimson; background-image: url("images/小新.jpg"); background: no-repeat center; /*第二种写法*/ /*background: crimson url("images/小新.jpg") no-repeat center;*/ } </style> </head> <body> <div class="box"></div> </body> </html>
程序中第一种写法运行不成功,这是为什么?
单个属性写在简写属性前面了
问题:自己做了一个个人简历的表格 请老师帮忙看看是否有问题
a、周末对表格的练习和巩固知识
b、代码:
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>表格练习</title> </head> <body> <table cellspacing="0" border="1px" align="center" > <caption>个人简历表格</caption> <tr> <td colspan="11" align="center">个人简历</td> </tr> <tr> <td colspan="11" align="right" valign="top">流水号:###</td> </tr> <tr align="center"> <td>*姓名</td> <td>hello</td> <td>*性别</td> <td>hello</td> <td>*生日</td> <td>hello</td> <td>*民族</td> <td>hello</td> <td colspan="3" rowspan="2" valign="top">照片</td> </tr> <tr align="center"> <td>*籍贯</td> <td>hello</td> <td>*身高</td> <td>hello</td> <td>*政治面貌</td> <td>hello</td> <td>*职位</td> <td>hello</td> </tr> <tr> </tr> <tr align="center"> <td>联系电话</td> <td colspan="3"></td> <td>昵称</td> <td colspan="2"></td> <td>个人爱好</td> <td colspan="3"></td> </tr> <tr align="center"> <td>学校地址</td> <td colspan="3"></td> <td>*QQ</td> <td colspan="2"></td> <td>E-mail</td> <td colspan="3"></td> </tr> <tr> <td>什么方式了解?</td> <td colspan="10"> 朋友介绍? 网络? 传单?  官网? ? 传单? </td> </tr> <tr> <td rowspan="3" align="center">社会经历</td> <td colspan="10" rowspan="3"></td> </tr> <tr> </tr> <tr> </tr> <tr> <td rowspan="3" align="center">个人经历</td> <td colspan="10" rowspan="3"></td> </tr> <tr> </tr> <tr> </tr> <tr> <td rowspan="3" align="center">证书</td> <td colspan="10" rowspan="3"></td> </tr> <tr> </tr> <tr> </tr> <tr> <td rowspan="3" align="center">奖项</td> <td colspan="10" rowspan="3"></td> </tr> <tr> </tr> <tr> </tr> </table> </body> </html>
c、效果图:
问题:关于图片的居中问题
a、为什么图片不可以使用align标签进行居中?除了套用另外的标签的办法使图片居中还有其它的办法嘛?
问题: 表格相关问题
a、在给表格或者单个单元格设置背景图片的时候 需不要给定宽度或者高度?来达到照片的正常显示?
我想让网页整出三个一行排列的图加字。用那些代码呀
无法解析。这是下一级的输入/115.jpg无法解析 文件夹是另行创建的都存在里边
软件的安装包和插件可以发下吗
想让盒子的背景图模糊但是盒子里面的内容不模糊该如何操作,盒子的高度是内容撑开的
老师,是路径错了吗?为什么图标不显示????
<button class="iconfont"></button> 老师,本来应该是放大镜图标,我的怎么显示这个?
在作业3中产生疑问:当我把第二、第三两个form注释掉时,运行效果一样,那我是否可以只写第一个form,这样更简洁?
一、没注释前
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>作业3</title> </head> <body> <table border="1" width="600" height="100" align="center" cellspacing="0"cellpadding="1"> <tr> <td align="right">用户名:</td> <td align="center"> <form action="ok.html" name="form1"> <input type="text"> </form> </td> </tr> <tr> <td align="right">密码:</td> <td align="center"> <form action="ok.html" name="form2"> <input type="password" name="password"> </form> </td> </tr> <tr> <td align="right">性别:</td> <td align="center"> <form action="ok.html" name="form3"> <input type="radio" name="sex" checked> <lable for="man">男</lable> <input type="radio" name="sex"> <lable for="woman">女</lable> </form> </td> </tr> </table> </body> </html>
二、注释后
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>作业3疑问</title> </head> <body> <table border="1" width="600" height="100" align="center" cellspacing="0"cellpadding="1"> <tr> <td align="right">用户名:</td> <td align="center"> <form action="ok.html" name="form1"> <input type="text"> </form> </td> </tr> <tr> <td align="right">密码:</td> <td align="center"> <!-- <form action="ok.html" name="form2">--> <input type="password" name="password"> <!-- </form>--> </td> </tr> <tr> <td align="right">性别:</td> <td align="center"> <!-- <form action="ok.html" name="form3">--> <input type="radio" name="sex" checked> <lable for="man">男</lable> <input type="radio" name="sex"> <lable for="woman">女</lable> <!-- </form>--> </td> </tr> </table> </body> </html>
效果一
效果二
style> .box{ width: 234px; height: 300px; background-color: pink; position: relative; overflow: hidden; } .box1{ width: 100%; height: 76px; background-color: orange; /*绝对定位 相对于已经定位的父元素定位*/ position: absolute; /*据父元素上面的距离为300px*/ top: 300px; /*据父元素的左侧距离为0*/ left: 0px; } /*鼠标悬停在box上,子代box1*/ .box:hover>.box1{ /*据父元素上面的距离变为224*/ top: 224px; } .box2{ width: 303px; height: 375px; background-color: red; position: relative; } .box2>img{ width: 100%; height: 100%; } .box3{ width: 100%; height: 100%; background-color: salmon(0,0,0,.2); position: absolute; top: 0px; left: 303px; } .box2:hover>.box3{ left: 0; } </style> </head> <body> <div class="box"> <div class="box1"></div> </div> <div class="box2"> <img src="img/370ad36f-425c-453a-b406-ccb2a0dffeec.jpg" alt=""> <div class="box3"></div> </div> </body> </html>
老师,我这个代码哪里不对吗?为啥达不到老师说的效果
<style> *{ margin: 0; padding: 0; } a{ text-decoration: none; } .box{ width: 303px; height: 375px; background-color: red; position: relative; } .box img{ width: 100%; } .text{ width: 100%; height: 88px; position: absolute; left: 0px; bottom: 20px; text-align: center; } .name{ color: #fff; font-size: 21px; font-weight: 800; } .yang{ color: #fff; font-size: 14px; } .yg{ color: #ebce6b; font-size: 24px; font-weight: 700; } </style> </head> <body> <div class="box"> <a href=""> <img src="img/370ad36f-425c-453a-b406-ccb2a0dffeec.jpg" alt=""> <div class="text"> <p class="name">MEIZU UR 高端定制耳机 预约</p> <p class="yang">【预约专用】私人定制,为你而声</p> <p class="yg">¥200</p> </div> </a> </div> </body> </html>
老师,这个font代码在这里有啥作用?
非常抱歉给您带来不好的体验!为了更深入的了解您的学习情况以及遇到的问题,您可以直接拨打投诉热线:
我们将在第一时间处理好您的问题!
关于
课程分类
百战程序员微信公众号
百战程序员微信小程序
©2014-2025百战汇智(北京)科技有限公司 All Rights Reserved 北京亦庄经济开发区科创十四街 赛蒂国际工业园网站维护:百战汇智(北京)科技有限公司 京公网安备 11011402011233号 京ICP备18060230号-3 营业执照 经营许可证:京B2-20212637