html - 使单个字符的 css 样式站点变宽?

标签 html css

客户只要求他的站点的 / 是红色的......在整个站点中!

我必须在每个/周围添加 span,还是有更简单的方法?

最佳答案

希望此示例对您有所帮助。我在SO中找到了它。您可以将 ® 替换为斜杠 /

的 html 代码
$(document).ready(function() {
    $('*').each(function() {
        var n = $(this).html().replace(
            new RegExp('®','g'),
            '<sup>®</sup>'
            ).replace(
            new RegExp('&reg;','g'),
            '<sup>&reg;</sup>'
            );
        $(this).html(n);
    });
});​

DEMO

关于html - 使单个字符的 css 样式站点变宽?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13028971/

相关文章:

javascript - 在主机定义的策略 : inline script. 中获取错误资源违反指令 'script-src ms-appx: ' unsafe-eval'' 资源将被阻止

html - div over div 的背景色

html - 滚动时在 iOS Safari 上出现奇怪的阻塞

html - 为什么 CSS include 的顺序不起作用?

html - 当用户设置浏览器字体大小时会发生什么?

html - 位置 : absolute; bottom: 0; create a few pixels gap

javascript - HTML5/javascript 错误

css - 如何创建两个 div,一个固定大小,另一个 100%

javascript - 滚动后固定背景图像

css - <dl> 不允许显示 :inline-block like <div> allows for