第一次上机测试:BootStrap

原题目要求如下:

代码:

<!DOCTYPE html>
<html>
<head>
    <title>登录界面</title>
    <style>

        /*表单样式*/
        .login-form {
            width: 300px;
            background-color: #fff;
            padding: 30px;
            border-radius: 5px;   /*边框圆角*/
            box-shadow: 0px 0px 10px rgba(0,0,0,0.1);   /*添加阴影*/
        }
        /*表单标题样式*/
        .login-form h2 {
            margin: 0 0 15px;
            text-align: center;
        }
        /*输入框样式*/
        .login-form input {
            width: 100%;
            padding: 10px;
            margin-bottom: 10px;
            border-radius: 5px;
            border: 1px solid #ccc;
        }
        /*确定按钮*/
        .sure {
            width: 25%;
            padding: 10px;   /*内间距*/
            border: none;   /*无边框*/
            border-radius: 5px;   /*边框圆角*/
            background-color: #0033ff;   /*按钮背景色*/
            color: #fff;   /*按钮文字颜色*/
            cursor: pointer;   /*鼠标指针样式变化*/
        }
        /*取消按钮*/
        .cancel {
            width: 25%;  
            padding: 10px;
            border: none;
            border-radius: 5px;
            background-color: #ffbb00;
            color: black;
            cursor: pointer;
        }
       
        
    </style>
</head>
<body>
    <form class="login-form">
        <h1>请登录</h1>
        <input type="text" placeholder="用户名" required>   <!--required确保用户输入正确-->
        <input type="password" placeholder="密码" required>
        <button class="sure" type="submit">登录</button>
        <button class="cancel" type="reset">取消</button>
    </form>

</body>
</html>

运行结果:

 其中输入框前的@符号暂时还不能够很好的解决……

  • 6
    点赞
  • 7
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值