html - Bootstrap & CSS - 输入按钮背景图片(图标大小)

标签 html css twitter-bootstrap

我有一个带有两个输入框和一个按钮的登录屏幕。我想在每个中放置一个背景图标。为此,我使用了 css 样式。

现在我在输入框中有一个背景图像,但我的尺寸有问题,它对于输入框来说太大了。

代码:

.btn {
    /*font-family: Gotham-Medium; Si activem no surten les icones */
    padding: 3px 6px;
    -webkit-transition: all 0.3s;
       -moz-transition: all 0.3s;
            transition: all 0.3s;
    background-color: #636363;
    color: #fff;
    border-radius: 0;
    border-color: #fff;
    font-size: large;
}
.btn-group {
    font-family: Gotham-Medium;
}
.pull-left {
     padding-right: 5px;            /* Distancia separación entre botones toolbar. */
}   
.btn-addcom{
     background-color: #009fe3;
     font-size: medium !important;
     font-family: Gotham-Medium !important;
}
.img-logo-login {
    width: 223px;
    height: 194px;
}

/* LOGIN */

.login-user{
    width: 223px;
    text-align: center; 
    background: url('../../assets/images/login-user-black.png') no-repeat scroll 2px 2px;
    padding-left: 30px; 
}
.login-pass{
    width: 223px;
    text-align: center; 
    background: url('../../assets/images/login-pass-black.png') no-repeat scroll 3px 3px;
    padding-left: 30px;     
}
.login-button{
    padding: 3px 6px;
    width: 223px;
    text-align: center;
    background-image: url('../../assets/images/login.png') no-repeat scroll 3px 3px;
    padding-left: 30px;         
}

input{
    padding: 3px 6px;
    font-family: Gotham-Medium;
    background-color: #fff !important;
    color: #636363 !important;
    border: 0 !important;
    border-bottom: 2px solid #dddddd !important;
}

/* FOOTER */

footer {
    position: fixed;
    height: 75px;
    bottom: 0;
    width: 100%;
}

<div class="container-fluid">
        <div class="row">
            <div class="col-md-12 text-center">
                <img class="img-logo-login" src="assets/images/Logo ADDcloud300-2.jpg"/>
            </div>
        </div>

        <form action="connect_start.php" method="post">
            <div class="row">   
                <div class="col-md-12 text-center">
                    <input type="text" class="login-user" placeholder="USUARI" name="username" required autofocus>
                </div>
            </div>
            <div class="row">   
                <div class="col-md-12 text-center">
                    <input type="password" class="login-pass" placeholder="PASSWORD" name="password" required>
                </div>
            </div>
            <div class="row">   
                <div class="col-md-12 text-center">
                    <button class="btn btn-addcom login-button" type="submit" style="width: 223px;">LOGIN</button>
                </div>
            </div>               
        </form>

截图:

enter image description here

你能帮帮我吗?

最佳答案

背景大小:包含也许...

关于html - Bootstrap & CSS - 输入按钮背景图片(图标大小),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40241737/

相关文章:

html - 如何在 AngularJS 的 ng-repeat 中动态添加文本框的 CSS

javascript - 旋转盖流效果

html - Bootstrap wordpress 主题在 Chrome 中显示奇怪的白色 div

javascript - Twitter Bootstrap .on ('show' ,function(){});不适用于弹出窗口

javascript - HTML 和 Javascript - 使用循环创建按钮不会 "individualize".onclick = {}

html - 如何正确 float 跨度

css - 填充屏幕宽度

css - 如何在更少的时间内更改原色值?

html - 带有自定义标记 CSS 动画的谷歌地图

html - Bootstrap 表单上传文件布局