You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

寻求帮助:查找text-primary类以修改HTML模板中圆点颜色

Fixing the Color of That Dot Next to "lorem"

Hey there! Let's get that dot color changed for you—no stress, this is a common hiccup when working with pre-built templates. Here's how to track down and modify that text-primary class:

1. Use Your Browser's DevTools to Locate the Class

First, let's find exactly where text-primary is defined:

  • Right-click the dot (the . next to "lorem") on your webpage and select Inspect (works in Chrome, Firefox, Edge, etc.).
  • In the right-hand Styles panel, you'll see all rules applied to that <span> element. Look for the .text-primary selector—next to it, you'll see the filename (like bootstrap.css, style.css) and line number where the color is set.
  • Open that CSS file in your code editor, find the .text-primary rule, and change the color value to whatever you want (e.g., color: #ff0000; for bright red).

2. If the Class Is Part of a Framework (Like Bootstrap)

Many templates use Bootstrap, where text-primary is a default utility class. Instead of modifying the original Bootstrap files (which can break future updates), override the class in your own custom CSS:

  • Create or open a custom CSS file (like custom.css—make sure it loads after any framework CSS files in your HTML).
  • Add this code to target only that specific dot (so you don't change other text-primary elements on the site):
    h1.site-logo span.text-primary {
        color: #your-preferred-color; /* Replace with your hex/rgb color code */
    }
    
  • Alternatively, if you want to redefine text-primary globally, use:
    .text-primary {
        color: #your-preferred-color !important;
    }
    
    (The !important flag ensures your rule takes precedence over the original, but using the more specific selector above is cleaner when possible.)

3. A Quick Alternative: Use a Custom Class

If you'd rather avoid messing with existing classes, just replace text-primary with your own custom class in the HTML:

<div class="col-6 col-xl-2"> 
  <h1 class="mb-0 site-logo">
    <a href="index.html" class="text-black h2 mb-0">lorem<span class="custom-dot">.</span></a>
  </h1> 
</div>

Then add this to your CSS:

.custom-dot {
    color: #your-preferred-color;
}

That should do the trick! Let me know if you hit any snags.

内容的提问来源于stack exchange,提问作者Tryingprogrammer

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.14 08:11:51