Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/82.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Html 在CSS中使用表情符号_Html_Css_Html Table_Emoji - Fatal编程技术网

Html 在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

我有一个HTML表格,我想根据要排序的列插入一个表情符号。我曾想过使用CSS来实现这一点,但不确定这是否可行。我计划使用的表情符号是⬆ 和⬇, 取决于列的排序顺序。列根据排序自动将类应用于asc和desc的th。我已经能够让图像正常工作,但我希望改用表情符号

带有图像的css示例:

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;}