问题标签 [text-indent]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
3 回答
1469 浏览

visual-studio-code - Visual Studio Code - 使用制表键缩进单行

我想知道是否可以在不删除标记文本的情况下使用制表键缩进一行。

在 GIF 的第一部分中,您可以看到 Visual Studio Code,在第二部分中可以看到 Atom。Atom 显示了所需的行为。

第一个:VS Code,第二个:ATOM-Editor

到目前为止,可以在 VS Code 中以这种方式缩进多行,它也适用于 backtab,但不适用于 tab 和单行。

VS Code 缩进多行

这是错误还是正常行为?

我的设置:
Visual Studio 代码:版本 1.25.1 (MacOS 10.13.6 High Sierra)
Visual Studio 代码:版本 1.25.1 (Ubuntu 18.04 LTS)

0 投票
1 回答
42 浏览

html - 如何从列表项中删除缩进

这是我的代码。如何从列表项中删除缩进?代码去哪儿了?

0 投票
3 回答
123 浏览

python - 缩进 Sublime 文本中的所有内容

如何使用 sublime text 3 在某个位置快速缩进所有内容。

例如:

假设我想快速将该代码放入 def 函数中,而无需单独缩进所有内容。我将如何做到这一点,以便我的代码看起来像这样。

0 投票
3 回答
319 浏览

javascript - How can I get second (third, etc.) line indentation to match first line in a list with custom numbering using CSS?

I'm new to HTML, CSS and JavaScript, so this may be a very basic problem, however, I haven't been able to find a solution by searching. Most solutions I've found deal with automatically numbered lists, or un-ordered lists.

I'm using Javascript to populate a list on a webpage from a JSON document. The output HTML list looks like this:

I then use CSS to style these to look like a single list:

This shows the generated numbers with the text to the right, however, if the text is long, like in the third ul in the example above, it loses all indentation when it moves down to a new line. Also, if one number is longer than another, the text to the right of it is indented by the same amount extra, but I'd like to have each line of text start in line with the text above and below it.

I've tried floating each list left and right, but that wrecked the formatting I had on the page. I'm sure there's some simple way to overcome this, but any search I've made has been related to automatically generated numbers for ol objects.

How do I keep my own list numbering, but control the consistency of indentation over multiple lines?

0 投票
0 回答
48 浏览

css - 插入符号重叠占位符并且 wpcf7 电子邮件输入自动缩进

我目前正在使用的 wordpress 网站https://atlanticattire.com/contact/包含一个联系页面,其中包含联系表 7 中的简码。当我没有在电子邮件字段中添加文本缩进代码时,它会自动预设出来5px,如果我做 -3px 左右,它实际上会在到达从边框的边缘之前消失。我向其他人添加了文本缩进,但电子邮件字段与其他人略有不同,我想知道如何摆脱自动缩进。其次,在 safari 上,显示“消息”的文本区域无法正常工作,因为插入符号与占位符文本重叠。我的自定义 CSS 是:

对不起,如果这没有任何意义,任何帮助将不胜感激(:

0 投票
1 回答
1092 浏览

mule - 带回车的 JSON 对象到字符串

在我的流程中,我读取并运行 ( for-each ) 一个JSON 对象数组。我使用APPEND类型将每个对象插入到同一个文件中。

在此处输入图像描述

我想将每个存储JSONindentfalse(JSON 一行)和一个carriage-return像这样的例子:

我用这个:

但它返回一个关于无法将对象强制转换为字符串的错误。 我该如何解决这个问题?

0 投票
1 回答
300 浏览

c# - 如何在不修改空格或缩进的情况下保存文件内容

我正在使用下面的代码来读取和更新text文件。

在读取文件内容之前看起来像这样

更新后,文件内容在一行中显示如下

如何保留包含空格或缩进的文件。

0 投票
1 回答
2167 浏览

latex - 乳胶包“indentfirst”在 R-markdown 中不起作用

我正在尝试使用indentfirst包在节标题后缩进第一行,但它不起作用。

这是latex输出

我希望节标题后的第一行缩进。

0 投票
2 回答
1048 浏览

html - 如何使用 CSS 在 BR 标签后添加 em 空格()

我想在 BR 标签之后添加一个 em-space 以实现文本缩进效果。但以下 STYLE 不适用于我的 Chrome。

或者,还有什么其他方法可以在 BR 标签之后实现文本缩进效果?

0 投票
2 回答
566 浏览

python - 如何自动缩进下一行字符串

我正在尝试使用 Python 制作一个程序,该程序会在遇到某些字符(例如大括号)时自动缩进下一行字符串。

例如:

我似乎无法掌握我需要编写什么代码才能实现这一目标。

任何形式的帮助将不胜感激!