是否可以在HTML中插入一个制表符,而不必键入 四次吗?
当前回答
理想的CSS代码应该是“display”和“min-width”属性的组合…
display: inline-block;
min-width: 10em; // ...for example, depending on the uniform width to be achieved for the items [in a list], which is a common scenario where tab is often needed.
其他回答
试着 
它相当于四个。
我使用一个不带项目符号的列表来呈现“标签”外观。 (这是我在使用MS Word时有时会做的事情)
在CSS文件中:
.tab {
margin-top: 0px;
margin-bottom: 0px;
list-style-type: none;
}
并且在HTML文件中使用无序列表:
This is normal text
<ul class="tab">
<li>This is indented text</li>
</ul>
这个解决方案的美妙之处在于,您可以使用嵌套列表进一步缩进。
一个新手在这里说话,所以如果有任何错误,请评论。
理想的CSS代码应该是“display”和“min-width”属性的组合…
display: inline-block;
min-width: 10em; // ...for example, depending on the uniform width to be achieved for the items [in a list], which is a common scenario where tab is often needed.
这不是一个直接的答案,但我想在Markdown文档中添加一个标签。我画了一个这样的对象图:
--Parent
|
+ Child 1
当然,简单的方法是通过缩进4个空格将其标记为代码,然后在Markdown中将其视为代码。
--Parent
|
+ Child 1
我们使用自定义空间跨度类
<span class='space'></span>
在CSS中包含空间类。
.space
{
margin-left:45px;
}
推荐文章
- 使伸缩项目正确浮动
- 形式内联内的形式水平在twitter bootstrap?
- 自定义元素在HTML5中有效吗?
- 如何触发自动填充在谷歌Chrome?
- 创建圈div比使用图像更容易的方法?
- 为什么Chrome浏览器不正确地确定页面是在不同的语言,并提供翻译?
- 在网页上用鼠标模拟震颤(例如帕金森病)?
- Bootstrap抛出Uncaught错误:Bootstrap的JavaScript需要jQuery
- 如何改变文本区域的边框颜色:焦点
- 我如何设置背景颜色为文本的宽度,而不是整个元素的宽度,使用CSS?
- 如何删除和清除所有的本地存储数据
- 强制打开“另存为…”弹出打开文本链接点击PDF在HTML
- 如何修改标签文本?
- 在HTML中还有其他有用的空格码吗,比如半空格的 , em-spaces, en-spaces等等?
- 输入触发器按钮单击