html - jquery 移动 CSS 类不适用于输入字段

标签 html css jquery-mobile

我希望将 .ui-input-text 类应用于输入字段。但是没有被应用。我正在使用 jquery 移动类进行文本输入。除非我使用 CSS 内联应用,否则边框半径不会改变。这是我的代码

<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="utf-8">
    <title>Login</title>

    <style type="text/css">
        @font-face {
            font-family: 'RNS Camelia';
            font-style: normal;
            font-weight: normal;
            src: local('RNS Camelia'), url(http://localhost/codeigniter/fonts/RNS_Camelia.otf);
        }

        .ui-btn {
            width: 40% !important;
            height: 15px !important;
            border-radius: 50px !important;
            text-align: center !important;
            background-color: #D6DE23 !important;
            font-family: 'RNS Camelia', serif !important;
        }

        .login_button {
            margin-left: 20px !important;
            text-align: center !important;
        }

        .ui-page {
            background-image: url('../codeigniter/images/background.jpg') !important;
            width: 100%;
            background-size: 100% 100%;
            background-repeat: no-repeat;
        }

        ​ .ui-input-text {
            border-radius: 50px !important;
        }

        .user_pass {
            text-align: center!important;
            color: white!important;
            font-family: 'RNS Camelia', serif!important;
            font-size: 16px!important;
            height: 20px!important;
        }

        .text_input_wrap {
            margin-right: 15px !important;
        }

        .bottom_links {
            color: white!important;
            font-family: 'RNS Camelia', serif!important;
            text-decoration: none !important;
        }
    </style>

    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="stylesheet" href="https://ajax.googleapis.com/ajax/libs/jquerymobile/1.4.3/jquery.mobile.min.css" />
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
    <script src="https://ajax.googleapis.com/ajax/libs/jquerymobile/1.4.3/jquery.mobile.min.js"></script>
</head>

<body>
    <div data-role="page">
        <div class="ui-content" data-role="main">
            <img border="0" src="<?php echo $this->config->base_url();?>   images/logo_only.png" alt="Logo Bar Express" style="margin:0px;width:313px;display:inline;height:142px;float:left;" />
            <div style="clear:both;"></div>



            <div class="ui-grid-b">
                <div class="ui-block-a">
                    <div class="user_pass">Username</div>
                </div>
                <div class="ui-block-b">
                    <div class="user_pass">Password</div>
                </div>
            </div>

            <div class="ui-grid-b">
                <div class="ui-block-a">
                    <div class="text_input_wrap">
                        <input type="text" id="username" name="username">
                    </div>
                </div>
                <div class="ui-block-b"> </div>

            </div>


            <input type="password" id="password" name="password">

            <div class="ui-grid-solo">
                <div class="ui-block-a">
                    <div class="login_button">
                        <input type="submit" value="LOGIN">
                    </div>
                </div>
            </div>



        </div>
    </div>

</body>

</html>

最佳答案

在您自己的样式表底部执行这段代码。

FIDDLE Demo

.ui-input-text{
    border-radius: 50px;
}

关于html - jquery 移动 CSS 类不适用于输入字段,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28987234/

相关文章:

html - Tomcat + Wicket 口 : UTF-8 chars not rendering properly

javascript - 有没有更准确的鼠标移动?

html - 字体系列不起作用

jQuery mobile,多个页面的 pageshow 事件

javascript - Phonegap 和 jQuery Mobile 架构问题

javascript - 在 jquery 中向 dataTable 添加行的函数给出 TypeError

JavaScript:匹配不是函数

css - 以百分比形式为圆形边界指定边界半径是否更好?

html - Bootstrap col-xs-5 在中心,col-xs-3.5 在两侧

javascript - trim 前导和尾随空格