ColaCoder 2015-05-03 05:27 采纳率: 0%
浏览 832

关于移动设备下浏览网站表单错位的问题

如图图片说明

完整代码:

 <!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>MyWeb - Using Bootstrap</title>
    <link rel="stylesheet" href="bootstrap/css/bootstrap.css">
    <meta name="viewport" content="width=device-width, height=device-height, initial-scale=1.0">
    <style type="text/css">
        .panel{
            transition: box-shadow 0.8s;
            -moz-transition: box-shadow 0.8s;   /* Firefox 4 */
            -webkit-transition: box-shadow 0.8s;    /* Safari 和 Chrome */
            -o-transition: box-shadow 0.8s;
            padding: 20px;
            border: 5px solid #ccc;
            filter: alpha(opacity=70);
            -moz-opacity: 0.7;
            opacity: 0.70;
        }
        .panel:hover{
            box-shadow: 0px 0px 25px #5bc0de;
        }
        body{
            background-image: url(bg.jpg);
            background-size: cover;
            -webkit-background-size: cover;
            -moz-background-size: cover;
            -o-background-size: cover;
            background-repeat: no-repeat;
        }
        .footer{
            position: absolute;
            left: 12%;
            top: 90%;
        }
    </style>
<!--
    <!–-[if lt IE 9]>  
        <script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>  
    <![endif]–->
-->
</head>
<body>
    <script src="bootstrap/js/jquery-2.1.3.min.js"></script>
    <script src="bootstrap/js/bootstrap.js"></script>
    <div class="container">
        <h1>MyWeb - Using Bootstrap</h1>
        <br />
        <div class="panel col-xs-3">
            <form>
                <div class="form-group">
                    <label for="username">用户名</label>
                        <input type="text" class="form-control" id="username" placeholder="手机号/邮箱">
                    </label>
                </div>
                <div class="form-group">
                    <label for="password">密码</label>
                        <input type="password" class="form-control" id="password" placeholder="">
                    </label>
                </div>
                <div class="checkbox">
                    <label>
                        <input type="checkbox"> 自动登录
                    </label>
                    <a style="float: right;" href="http://urlikesunshine.com">忘记密码</a>
                </div>
                <div align="center">
                    <button type="submit" class="btn btn-default">登录</button>
                </div>
            </form>
        </div>
        <div class="footer"><strong>版权所有 Sunshine 2015</strong></div>
    </div>
</body>
</html>
  • 写回答

1条回答 默认 最新

  • CSDN-Ada助手 CSDN-AI 官方账号 2022-10-27 15:53
    关注
    不知道你这个问题是否已经解决, 如果还没有解决的话:

    如果你已经解决了该问题, 非常希望你能够分享一下解决方案, 写成博客, 将相关链接放在评论区, 以帮助更多的人 ^-^
    评论

报告相同问题?

悬赏问题

  • ¥15 自适应 AR 模型 参数估计Matlab程序
  • ¥100 角动量包络面如何用MATLAB绘制
  • ¥15 merge函数占用内存过大
  • ¥15 Revit2020下载问题
  • ¥15 使用EMD去噪处理RML2016数据集时候的原理
  • ¥15 神经网络预测均方误差很小 但是图像上看着差别太大
  • ¥15 单片机无法进入HAL_TIM_PWM_PulseFinishedCallback回调函数
  • ¥15 Oracle中如何从clob类型截取特定字符串后面的字符
  • ¥15 想通过pywinauto自动电机应用程序按钮,但是找不到应用程序按钮信息
  • ¥15 如何在炒股软件中,爬到我想看的日k线