如何将CSS样式应用于ASCII字符

时间:2015-03-11 04:45:14

标签: html css

我希望减少html文档中我的ascii度字符°的权重。有人知道吗?

HTML:

<html>
<body>
    <table>
        <tr>
            <td>
            <div style="position:absolute; top: 70; right: 0;">
                    72
                    <span>&deg;</span>
                    F
            </div>
            </td>
        </tr>
    </table>
</body>
</html>

CSS:

body {
    height: 100%;
    font-weight: 400;
    color: white;
    background-color: #000000;
    overflow: hidden;
}

div{
font-size: 80px;
margin: 2px;
padding: 2px;
}

@font-face {
    font-family: aFont;
    src: url(ostrich-rounded-webfont.ttf);
}

.fontclass{
    font-family: aFont, Helvetica;
    color: #FFFFFF;
 }

a:link {
text-decoration: none;
}

a:visited {
text-decoration: none;
}

a:hover {
 text-decoration: none;
}

a:active {
 text-decoration: none;
}

div span{
    font-weight:1;
    font-size:1px;
}

1 个答案:

答案 0 :(得分:2)

请尝试以下操作: Demo

CSS:

p {
    font-weight:bold;
}
p span {
    font-weight:100;
    font-size:11px;
}

HTML:

<p>Test test Test test Test test  <span> &deg;</span> Test test Test test Test test Test test </p>

修改: Updated demo

CSS:

p, div{
    font-weight:bold;
}
p span, div span {
    font-weight:100;
    font-size:11px;
}

HTML:

<div stile="position:absolute; top:70; right:0;"> 89 <span> &deg;</span> </div>