【问题标题】:How to get a image as <ul type style>?如何获取图像作为<ul type style>?
【发布时间】:2017-10-16 08:22:22
【问题描述】:

风格

<style>
  ul{
    list-style-image: url('../8iAbk7rjT.png');
  }
</style>

编码

<ul>
  <asp:DataList ID="dd" runat="server">
    <ItemTemplate>
        <li><a href="/Pages/index.aspx?category=<%#Eval("id") %>">
          <%#Eval("name") %></a></li>
        <hr />
     </ItemTemplate>
  </asp:DataList>
</ul>

如何在 asp.net 中以UL 样式获取图像。 有什么解决办法吗??

【问题讨论】:

  • 您的意思是要使用图像作为要点吗?

标签: c# html css asp.net


【解决方案1】:

在 asp.net 中对此没有什么特别的。这是 CSS 问题。您的代码很好,只需检查图片网址是否正确即可。

ul{
   list-style-image: url('http://forums.androidcentral.com/images/smilies/cool.png');
   padding: 0 0 0 30px;
   margin: 0 0 0 15px;
}

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2023-04-07
    • 2016-01-25
    • 2019-09-09
    • 1970-01-01
    • 2011-09-10
    相关资源
    最近更新 更多