在 html 中添加星号 [英] Put a Star notation in html

查看:97
本文介绍了在 html 中添加星号的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在我的 html 页面中添加星号."#x2605;"我知道这个是用于纯星符号的.但是颜色是黑色的.我需要红色的星星.我怎样才能做到这一点.帮帮我..

I want to put a star notation in my html page."#x2605;" i know that this one is for solid star notation.but black in color.i need the star in RED color.how can i achive this. help me..

推荐答案

html:

<span class="red-star">★</span>

CSS:

.red-star {
    color: red;
}

字体标签在 html5 中已贬值.见 http://www.w3.org/TR/html4/present/graphics.html#h-15.2.2

Font tags are depreciated in html5. See http://www.w3.org/TR/html4/present/graphics.html#h-15.2.2

这篇关于在 html 中添加星号的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆