首页 > Web开发 > 详细

BootStrap 之 CSS全局样式中的表单

时间:2020-04-05 09:36:55      阅读:72      评论:0      收藏:0      [点我收藏+]

不使用BootStrap 之 CSS全局样式中的表单,自己也不定义CSS样式

<form>
    <div>
        <label>Email address</label>
        <input type="email" placeholder="Email">
    </div>
    <div>
        <label>Password</label>
        <input type="password" placeholder="Password">
    </div>
    <div>
        <label>File input</label>
        <input type="file">
        <p>Example block-level help text here.</p>
    </div>
    <div>
        <label>
            <input> Check me out
        </label>
    </div>
    <button type="submit">Submit</button>
</form>

效果如下:

技术分享图片

 

使用BootStrap 之 CSS全局样式中的表单

<form>
    <div class="form-group">
        <label for="exampleInputEmail1">Email address</label>
        <input type="email" class="form-control" id="exampleInputEmail1" placeholder="Email">
    </div>
    <div class="form-group">
        <label for="exampleInputPassword1">Password</label>
        <input type="password" class="form-control" id="exampleInputPassword1" placeholder="Password">
    </div>
    <div class="form-group">
        <label for="exampleInputFile">File input</label>
        <input type="file" id="exampleInputFile">
        <p class="help-block">Example block-level help text here.</p>
    </div>
    <div class="checkbox">
        <label>
            <input type="checkbox"> Check me out
        </label>
    </div>
    <button type="submit" class="btn btn-default">Submit</button>
</form>

效果如下:

技术分享图片

 

详情请查看:全局 CSS 样式

BootStrap 之 CSS全局样式中的表单

原文:https://www.cnblogs.com/liyihua/p/12406011.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!