我想问问你们中是否有人知道将链接更改为图标的语法,单击该图标会自动在 CodeIgniter 中下载。
我有一个下载链接,但我不知道在哪里插入图标以及如何插入图标?有知道的请赐教谢谢
我得到的下载语法
<th field="file" width="50" sortable="true" data-options="formatter:function(val){
return '<a href=\'<?php echo base_url(); ?>uploads/'+val+'\' target=\'_blank\'>' + val + '</a>';
}">File</th>
最佳答案
像这样修改类
<style>
.link_with_image{
background-image: url('your desired image');
height: 20px;
width: 20px;
display: inline-block;
background-repeat: no-repeat;
}
</style>
您可以根据需要更改宽度和高度
关于php - 将链接文本更改为图标链接,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26479000/