【问题标题】:Bullet behaving like soft hyphen [duplicate]子弹表现得像软连字符[重复]
【发布时间】:2013-12-24 08:45:55
【问题描述】:

我想创建以项目符号分隔的内联项目列表,但我想隐藏行尾的所有项目符号。示例:

法国 • 德国 • 希腊

匈牙利 • 冰岛 • 爱尔兰

(如您所见,希腊和匈牙利之间没有子弹)。

现在,问题是,我需要它在任何视口宽度下工作。文本应自然换行,项目符号应仅在它们不在换行符处出现。

这在某种程度上类似于软连字符 (­) 的行为。

有什么方法可以实现吗?也许某种 unicode 控制字符..?

谢谢!

【问题讨论】:

  • 发给我们一些工作小提琴,这将帮助我们帮助你
  • @Kirk 这个问题有什么不清楚的地方?当他不知道如何使它工作时,他怎么能放一个工作小提琴?
  • @Pumbaa80 是的,这是重复的,谢谢。

标签: css html unicode responsive-design


【解决方案1】:

您只需要编写简单的 css 代码:

.someclass{
list-style:none;
}

在你的

中添加类
<ui>
<li class="someclass">
</li>
</ul>

【讨论】:

  • 这只会删除项目符号..
【解决方案2】:
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>Display Progress</title>
    <script src="Scripts/jquery-1.3.2.js"
    type="text/javascript"></script>

    <script type="text/javascript">
        $(document).ready(function() {
        var geoList = [
             { Country: "India", State: "Delhi" },
             { Country: "US", State: "Alabama" },
             { Country: "US", State: "Georgia" },
             { Country: "US", State: "Texas" },
             { Country: "US", State: "NewYork" }
             ];
            $('#LoadPage').append("<ul id='cList'></ul>");
            for (i = 0; i < geoList.length; i++) {
                $("#cList").append("<li>" +
                geoList[i].Country + "-" +
                geoList[i].State + "</li>");
            }
        });
    </script>
</head>
<body>
    <form id="form1">
    <div>   
        <div id="LoadPage">
        </div>  
    </div>
    </form>
</body>
</html>

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2014-01-20
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-04-17
    • 2018-05-24
    • 2019-01-12
    • 2012-10-07
    相关资源
    最近更新 更多