在作业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代码在这里有啥作用?
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Title</title> </head> <body> <img src="C:\Users\12130\Desktop\2222.gif\" alt=""> </body> </html>
在绝对路径盘符中,出现cannot resolve file 解析错误时要怎么解决(已经尝试换图片和路径,但是还是出现一样的问题)
<table border="1" align="center" width="300" height="300" cellspacing="0" bordercolor="orange" cellpadding="0">
<tr bgcolor="pink">
<td colspan="2"></td>
<td rowspan="2"></td>
</tr>
<tr>
<td rowspan="2" bgcolor="pink"></td>
<th bgcolor="purple">钢</th>
</table>
为什么打上字形状会变
为什么我的多行文本框实现不了
<textera name="texts" id="texts" rows="5" cols="5"></textera>
上面的是视频里面的
下面这个是我打的,我想了解的是为什么我打的代码下面会多出一个href=“”
在引入图片时相对路径和绝对路径有什么区别吗,
请问 标记等于标签吗 谢谢
老师请问当鼠标悬停的时候,想让他的父元素的兄弟元素生效该怎么写呢。
<img src="C:\Users\zsh\Desktop\timg1.jpg" alt="">
<img src="C:\Users\zsh\Desktop\img2.gif" alt="">
火狐浏览器没有显示图片怎么办
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<style>
*{
margin: 0;
padding: 0;
}
.items{
height: 450px;
background-color: blueviolet;
float: left;
padding: 10px;
box-sizing: border-box;
.items>div{
width: 100%;
height: 100%;
background-color: coral;
/* 移动端 */
@media screen and(max-width:768px){
width: 50%;
/* ipad端 */
@media screen and(max-width:768px)and(max-width:992px)
{.items{
width: 33%;
/* pc端*/
width: 25%;
</style>
</head>
<body>
<div class="box" >
<div class="items">
</div>
</body>
</html>
老师为什么我这个显示不出来呀
我想问一下这里alt,图片不能正常显示的原因有哪些呢?
有没有webstrom的安装包呢
非常抱歉给您带来不好的体验!为了更深入的了解您的学习情况以及遇到的问题,您可以直接拨打投诉热线:
我们将在第一时间处理好您的问题!
关于
课程分类
百战程序员微信公众号
百战程序员微信小程序
©2014-2025百战汇智(北京)科技有限公司 All Rights Reserved 北京亦庄经济开发区科创十四街 赛蒂国际工业园网站维护:百战汇智(北京)科技有限公司 京公网安备 11011402011233号 京ICP备18060230号-3 营业执照 经营许可证:京B2-20212637