Html 在CSS中使用表情符号
我有一个HTML表格,我想根据要排序的列插入一个表情符号。我曾想过使用CSS来实现这一点,但不确定这是否可行。我计划使用的表情符号是⬆ 和⬇, 取决于列的排序顺序。列根据排序自动将类应用于asc和desc的th。我已经能够让图像正常工作,但我希望改用表情符号 带有图像的css示例:Html 在CSS中使用表情符号,html,css,html-table,emoji,Html,Css,Html Table,Emoji,我有一个HTML表格,我想根据要排序的列插入一个表情符号。我曾想过使用CSS来实现这一点,但不确定这是否可行。我计划使用的表情符号是⬆ 和⬇, 取决于列的排序顺序。列根据排序自动将类应用于asc和desc的th。我已经能够让图像正常工作,但我希望改用表情符号 带有图像的css示例: table.table thead th.sortable { background: url('../img/sort_both.png') no-repeat center right; } table.tabl
table.table thead th.sortable { background: url('../img/sort_both.png') no-repeat center right; }
table.table thead th.asc { background: url('../static/images/open-iconic/svg/sort-ascending.svg') no-repeat center right; }
table.table thead th.desc { background: url('../static/images/open-iconic/svg/sort-descending.svg') no-repeat center right; }
您可以与emojis的内容一起使用以实现以下目的:
.asc::之前{
内容:'⬇️';
}
.desc::之前{
内容:'⬆️';
}
您可以与emojis的内容一起使用以实现以下目的:
.asc::之前{
内容:'⬇️';
}
.desc::之前{
内容:'⬆️';
}
这很有效,谢谢你。我希望它在我文本的右边,所以使用:.asc::after{content:'⬇️'; 好的;}这很有效,谢谢。我希望它在我文本的右边,所以使用:.asc::after{content:'⬇️'; float:right;}