【发布时间】:2016-12-03 17:29:30
【问题描述】:
我将字形图标的颜色更改为蓝色。要更改颜色,我使用了以下代码。
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.2/jquery.min.js"></script>
<script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
<link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css">
<style>
.colorful {
color: blue !important;
}
@media print {
.colorful {
color: blue !important;
}
}
</style>
</head>
<body>
<span class="glyphicon glyphicon-comment colorful" style="padding-left:100px;padding-top:100px"></span>
</body>
</html>
我正在使用 chrome 浏览器。我需要让图标在打印预览中显示为蓝色
【问题讨论】:
-
可能对你有帮助
-
感谢您的帮助。但是文本颜色正在改变,只有 glyphyicon 图标颜色在打印中没有改变。