css 负缩进 'tab'之间
我了解负缩进如何与 CSS 配合使用,但我的问题是,有没有办法在负缩进的开头和文本的其余部分之间有一种“制表符”?
我想要完成的外观与 http://copyrighter.ru/canada/test.htm 中的外观相同 - 请查看从 [6] 开始的段落。
请注意,[6] 已移至该行的左侧,而其余部分看起来像一个整齐的方形段落。
我目前正在用两个 div 来做。
它看起来正是我想要的样子,但是当我将文本复制到 MS Word 中时,复制的文本全乱了。
我想知道是否有更简单的方法来完成相同的任务。
I understand how negative indent works with CSS, but my question is, is there a way to have a kind of 'tab' in between the beginning of the negative indent and the rest of the text?
What I am trying to accomplish is the same look as in http://copyrighter.ru/canada/test.htm - please have a look at paragraphs starting from [6].
Notice that [6] is moved to the left of the line, while the rest of it looks like a neat square paragraph.
I am currently doing it with two divs.
It looks exactly the way I want it to look, but when I copy the text into MS Word, the copied text is all messed up.
I am trying to figure out if there is an easier way to accomplish the same task.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
尝试将数字放入具有“绝对”位置的 SPAN 中。像这样的东西:
http://jsfiddle.net/WvU7X/
但是,我猜粘贴后看起来不会完全一样将文本导入Word。
Try to put numbers into SPANs having "absolute" positions. Something like this:
http://jsfiddle.net/WvU7X/
However, I guess it won't look exactly the same after pasting the text into Word.
不要使用 DIV,而是用标签分隔元素,然后赋予它们属性“display: inline-block;”。这将允许它们在仍然显示为内联的同时应用填充/边距。
请注意,对于 IE7 及更高版本,内联块无法正常工作。相反,您必须使用组合:“display: inline; Zoom: 1;”。然后继续你的填充和保证金业务。
使用 span 标签将允许您复制/粘贴到 Word 中,并且比 div 造成的损坏更少。
Instead of using DIVs, separate the elements with tags, then give them the attribute "display: inline-block;". This will allow them to have padding / margin applied to them while still appearing inline.
Note that for IE7 and thereabouts, inline-block does not work properly. Instead you have to use a combination: "display: inline; zoom: 1;". Then go about your padding and margin business.
The use of span tags will allow you to copy / paste into Word with less damage than divs.