css - 设置问号点颜色?可能的?

标签 css

我在另一个 SO 问题中找到了这个答案,想知道问号点是否可以做同样的事情?仅为点设置某种颜色。

jsbin.com/urOtixog/1/edit?html,css,输出

欢迎任何想法。 感谢您的宝贵时间和想法!

BR

最佳答案

我在这里使用您的示例代码作为基础并做了类似的事情。我在 ? 周围使用了 span 标签,并将 :before sudo 元素设置为 . 我覆盖在问号之上。您可能需要调整 margin-left 以与您使用的字体对齐。

p {
  font-size: 65px;
}
.question {  
  color: black;
  position: relative;
}
.question:before {
  content: ".";
  position: absolute; 
  color: red;
  margin-left:5px
}
<p>this<span class="question">?</span></p>

关于css - 设置问号点颜色?可能的?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54695496/

相关文章:

html - 让一个div填充剩余屏幕空间的高度

javascript - 如何创建一个 'onclick' 函数?

html - SASS + SMACSS 正确封装模块

javascript - HTML/CSS - 调整字体大小以填充父级高度和宽度

CSS 动画 : Fade Out permanently

javascript - e.stopPropagation 不工作

javascript - TweenLite 动画突然改变元素的位置?

jquery - 遍历 HTML : how can I hide a color when I move to another element?

css - R Markdown : nice way to show a long text in a html table

jQuery 动画输入值