IDE:html id 和类参数值中的奇怪颜色

发布于 2024-12-10 21:38:51 字数 253 浏览 0 评论 0原文

我刚刚开始使用 Netbeans,我喜欢它,但我似乎找不到在哪里更改 html id 和类参数值的字体,而且它目前与我的标签颜色相同,具有随机背景颜色。

我一直在尝试“工具”->“选项”->“字体”->“语法”,但我似乎找不到正确的仪式和调用来更改此设置。

我应该去哪里寻找?

以下是说明该问题的技术读数: 在此处输入图像描述

I just started using Netbeans and I love it, but I can't seem to find where to change the font of html id and class parameter values, and its currently the same color as my tags with a random background color.

I've been playing around in Tools->Options->Fonts->Syntax but I can't seem to find the correct rites and invocations to change this.

Where should I be looking?

Here is a technical read out that illustrates the problem:
enter image description here

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(5

把梦留给海 2024-12-17 21:38:52

class 和 id 属性的值实际上是 CSS 选择器,它具有与普通 HTML 参数值不同的语法突出显示。要修改这些,您应该在字体和字体的语法选项卡中更改级联样式表语言中的选择器类别的值。颜色选项屏幕。

The values for class and id attributes are actually CSS selectors, which have a different syntax highlighting than normal HTML parameter values. To modify these you should alter the value of the Selector category in the Cascading Style Sheets language in the syntax tab of the fonts & colors options screen.

初见 2024-12-17 21:38:52

您要查找的内容并不像许多人所说的那样位于“层叠样式表”部分。您要查找的内容位于字体和颜色下的HTML部分。查找 HTML 中嵌入的 CSS。这就是您正在寻找的。希望这有帮助。

*我使用的是 Netbeans 7.4

What you are looking for is NOT in the Cascading Style Sheets section like many are saying. What your looking for is in the HTML section under the Fonts and colors. Look for Css Embedded in HTML. This is what you are looking for. Hope this helps.

*I'm using Netbeans 7.4

北风几吹夏 2024-12-17 21:38:52

您可以从选择器下的级联样式表更改颜色,然后重新启动 NetBeans。

You can change the color from cascading style sheets under selector and restart NetBeans.

江湖彼岸 2024-12-17 21:38:52

可以通过字体和字体进行更改颜色选项,然后选择级联样式表类别并在列表中找到“标记出现次数”。从那里,您可以更改该语法的背景和前景色。

Can be changed through the Fonts & Colors options, then select the Cascading Stylesheet category and find "Mark Occurences" on the list. From there, you can change the background and foreground colors for that syntax.

在你怀里撒娇 2024-12-17 21:38:52

我最近也遇到了同样的问题,实际上没有从其他帖子中找到解决方案,所以我想分享一下我发现的内容。您的问题分为两个子问题(直接引用):

  1. 在哪里更改 html id 和类参数值的字体

为此,我发现接受的答案和 @user3267044 答案都有效。不过,它们会更改类和 id 的参数,不仅会更改问题中所示的类参数背景颜色

  1. ,而且它当前的颜色与我的带有随机背景颜色的标签的颜色相同。

线上应该有警告出现“奇怪”突出显示的地方。就我而言,警告/提示是“缺少 CSS 类”。您可以从编辑器禁用它-->提示(选择 HTML),然后禁用提示“缺少 CSS 类”(或适用于您的情况的提示)

I have recently had the same problem and actually did not find the solution from the other posts, so I thought to share what I found. Your question is broken down in two sub-questions (direct reference):

  1. where to change the font of html id and class parameter values

For that, I found that both the accepted and @user3267044 answers work. They change both class and id's parameters though, not only class parameters background color as shown in your question

  1. and its currently the same color as my tags with a random background color.

There should be a warning on the line where the "weird" highlight appears. In my case, the warning/hint was "Missing CSS class". You can disable it from Editor --> Hints (select HTML) and then disable the hint "Missing CSS class" (or the one that applies to your case)

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文