HTML中的缩进

时间:2017-01-08 12:25:09

标签: html

我想像附加文档那样缩进。我试过了

<script>
    $(document).ready(function () {

        var arr = [{ id: 100, text: 'Lorem Ipsum 1' },
            { id: 200, text: 'Lorem Ipsum 2'}];

        $('#inputID').select2({
            data: arr,
            width: 200,
            multiple: true
        });
    });
</script>

enter image description here但是没有获得所需的输出。我不想要任何单独的段落。请帮忙。

1 个答案:

答案 0 :(得分:0)

给你的强元素留下一个浮点数,并为p元素增加一些余量,该元素应该等于或大于强元素文本宽度。

&#13;
&#13;
<style type="text/css">
.tab { margin-left: 100px; }
 strong {float:left;}
</style>

<strong> Introduction: </strong>
<p class='tab'>
This is the introduction. This is the introduction. This is the     introduction. This is the introduction. This is the introduction. This is the introduction. This is the introduction. This is the introduction. This is the  introduction. 
</p>
&#13;
&#13;
&#13;