Home > Web Front-end > HTML Tutorial > Extract bootstrap css style_html/css_WEB-ITnose

Extract bootstrap css style_html/css_WEB-ITnose

WBOY
Release: 2016-06-24 11:54:32
Original
1374 people have browsed it

This is part of the jsp code

<th class="col-sm-1">                                        <div class="col-sm-10 form-group">                                            <label class="col-sm-3 control-label no-padding-right"                                                   for="form-field-1" style="font-size: x-small">                                                 </label>                                            <select class="col-sm-7" id="form-field-1" ng-model="select1"                                                    ng-options="m.codename for m in inscom">                                                <option value="">.</option>                                            </select>                                        </div>                                    </th>
Copy after login

It contains many bootstrap css class selectors, col-sm-1, col-sm-10 form-group, etc.
Now I want to extract these classes and put them in a class, such as the following form:
<th class="th">                                        <div>                                            <label                                                   for="form-field-1" style="font-size: x-small">                                                 </label>                                            <select  id="form-field-1" ng-model="select1"                                                    ng-options="m.codename for m in inscom">                                                <option value="">.</option>                                            </select>                                        </div>                                    </th>
Copy after login

It is to extract the public class. I only need to introduce a class. I don’t know if it can be achieved? ? ? ?


Reply to discussion (solution)

You want to merge col-sm-1, col-sm-10 form-group, etc. together, It can be done, but it's very troublesome. Unless all your code is what you screenshot.
Because the classes col-sm-1 and col-sm-10 form-group are common in other parts of the same page and other pages, if you merge col-sm-1 and col-sm-10 form-group into th, just merge the part you took the screenshot, otherwise the style will be messed up if you use other parts of col-sm-1, col-sm-10 form-group.

If you want to merge col-sm-1, col-sm-10 form-group, etc., you can do it, but it is very troublesome. Unless all your code is what you screenshot.
Because the classes col-sm-1 and col-sm-10 form-group are common in other parts of the same page and other pages, if you merge col-sm-1 and col-sm-10 form-group into th, just merge the part you took the screenshot, otherwise the style will be messed up if you use other parts of col-sm-1, col-sm-10 form-group.


So how do you merge it if you only merge the above parts? ?

For example: class="col-sm-3 control-label no-padding-right"
You need to merge these styles into one and remove duplicates, but it is not recommended. The reason why we do this separately is to avoid duplication when writing styles for the entire site and to facilitate control.

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template