HTML fieldset标签的使用方法是什么,如何用于登录页面
Admin 2022-09-24 群英技术资讯 918 次浏览
这篇文章主要讲解了“HTML fieldset标签的使用方法是什么,如何用于登录页面”,文中的讲解内容简单、清晰、详细,对大家学习或是工作可能会有一定的帮助,希望大家阅读完这篇文章能有所收获。下面就请大家跟着小编的思路一起来学习一下吧。<form> <fieldset> <legend>Personalia:</legend> Name: <input type="text"><br> Email: <input type="text"><br> Date of birth: <input type="text"> </fieldset></form>
运行效果如图:

下面是一个比较复杂的fieldset标签使用示例,CSS login登录面板页面设计:
fieldset {
border:none;
margin:0;
}
input {
border:none;
font-family:inherit;
font-size:inherit;
margin:0;
-webkit-appearance:none;
}
input:focus {
outline:none;
}
input[type="submit"] {
cursor:pointer;
}
#login-form {
margin:10px;
width:300px;
border:1px solid #ea6e10;
vertical-align:middle;
border-radius:0px;
}
#login-form h3 {
background-color:#ea6e10;
color:#fff;
font-size:14px;
margin-top:0;
padding:20px;
text-align:right;
}
#login-form fieldset {
background:#fff;
border:1px #ea6e10;
padding:20px;
position:relative;
}
#login-form input {
font-size:14px;
}
#login-form input[type="username"],
#login-form input[type="password"] {
background:#dcdcdc;
padding:12px 10px;
width:100%;
margin-top:5px;
}
#login-form input[type="username"] {
}
#login-form input[type="password"] {
border-radius:0px 0px 3px 3px;
}
#login-form input[type="submit"] {
background:#ea6e10;
text-align:center;
color:#fff;
float:left;
font-weight:bold;
margin-top:5px;
padding:12px 20px;
width:100%;
}
#login-form input[type="submit"]:hover {
background:#ea6e10;
}
.bubble
{
position:relative;
width:250px;
padding:0px;
background:#FFFFFF;
-webkit-border-radius:10px;
-moz-border-radius:10px;
border-radius:10px;
border:#ea6e10 solid 2px;
}
.bubble:after
{
content:'';
position:absolute;
border-style:solid;
border-width:15px 15px 0;
border-color:#FFFFFF transparent;
display:block;
width:0;
z-index:1;
bottom:-15px;
left:136px;
}
.bubble:before
{
content:'';
position:absolute;
border-style:solid;
border-width:16px 16px 0;
border-color:#ea6e10 transparent;
display:block;
width:0;
z-index:0;
bottom:-17px;
left:135px;
}
html登录面板代码:
<body> <div id="login-form" class="bubble" style="float:left;"> <h3>Login</h3> <fieldset> <input type="username" required value="username" onBlur="if(this.value=='')this.value='username'" onFocus="if(this.value=='username')this.value='' "> <!-- JS because of IE support; better: placeholder="username" --> <input type="password" required value="Password" onBlur="if(this.value=='')this.value='Password'" onFocus="if(this.value=='Password')this.value='' "> <!-- JS because of IE support; better: placeholder="Password" --> <p><a href="#">Forgot Password?</a></p> <input type="submit" value="Login"> </fieldset> </div> </body>
CSS login登录面板设计,运行效果如图所示:

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:mmqy2019@163.com进行举报,并提供相关证据,查实之后,将立刻删除涉嫌侵权内容。
猜你喜欢
在css中,可以利用float属性把两段元素并排显示,该属性用于设置元素的浮动方向,当属性的值为“left”时元素向左浮动,进而使元素并排显示,语法为“元素{float:left;}”。
这篇文章主要介绍了Canvas跟随鼠标炫彩小球的实现,文中通过示例代码介绍的非常详细,对大家的学习或者工作具有一定的参考学习价值,需要的朋友们下面随着小编来一起学习学习吧
这篇文章主要介绍了解决css中hover做遮盖罩闪动问题的相关知识,需要的朋友可以参考下
这篇文章主要介绍了html中input提示文字样式修改,本文通过实例代码给大家介绍的非常详细,对大家的学习或工作具有一定的参考借鉴价值,需要的朋友可以参考下
这篇文章给大家分享的是如何利用CSS3实现不规则五边形。小编觉得挺实用的,因此分享给大家做个参考,文中的示例代码介绍得很详细,有需要的朋友可以参考,接下来就跟随小编一起了解看看吧。
成为群英会员,开启智能安全云计算之旅
立即注册关注或联系群英网络
7x24小时售前:400-678-4567
7x24小时售后:0668-2555666
24小时QQ客服
群英微信公众号
CNNIC域名投诉举报处理平台
服务电话:010-58813000
服务邮箱:service@cnnic.cn
投诉与建议:0668-2555555
Copyright © QY Network Company Ltd. All Rights Reserved. 2003-2020 群英 版权所有
增值电信经营许可证 : B1.B2-20140078 粤ICP备09006778号 域名注册商资质 粤 D3.1-20240008