Home >Web Front-end >HTML Tutorial >How to remove the small black dot in front of the

  • tag and some attributes of ul and LI in Html div css_html/css_WEB-ITnose

  • How to remove the small black dot in front of the
  • tag and some attributes of ul and LI in Html div css_html/css_WEB-ITnose
  • WBOY
    WBOYOriginal
    2016-06-24 12:27:121674browse

    div is used by many people when making websites, but there is always a small black dot in front of it when displaying the effect. Many people don’t want this effect, but they don’t know how to remove it. However, we can use The following methods are used to clear it.

    1. Write code in CSS. Find relevant CSS, in . Write list-sytle:none under .li and .ul; of course, some people will write list-style-type:none like this. This writing method is the most common especially in some CMS.

    2. Find the head part of the relevant page and write the following code

    <style type="text/css">list-style:none;

    531ac245ce3e4fe3d50054a55f265927

    3. Add list- in li,ul style. For example688d650fce405f8f2a6367301a3f815025edfb22a4f469ecb59f1190150159c642b479797b0d15eb65478589053d63cemy blog5db79b134e9f6b82c0b36e0489ee08ed2867e861ba23559b572f230426ab14eac9216a139dfb7706b52f46f5ed1bdd67 Of course this is very troublesome

    最简单的就是第一种了,通过CSS来控制,这个当然会有不错的效果了。这几种方法都是通过设置list-style:none来设置的,有的是会用list-style-type,下面我们来看一看它的属性。none不使用项目符号disc实心圆,默认值circle空心圆square实心方块decimal阿拉伯数字lower-roman小写罗马数字upper-roman大写罗马数字lower-alpha小写英文字母upper-alpha大写英文字母这些都可以来代替上文中的none,想要什么样的都会有一个相应的对应。 A).运用CSS格式化列表符: ul li{list-style-type:none;}B).如果你想将列表符换成图像,则: ul li{list-style-type:none;list-style-image: url(images/icon.gif);}C).为了左对齐,可以用如下代码: ul{list-style-type:none;margin:0px;}D).如果想给列表加背景色,可以用如下代码: ul{list-style-type: none;margin:0px;}ul li{background:#CCC;}E).如果想给列表加MOUSEOVER背景变色效果,可以用如下代码: ul{ list-style-type: none; margin:0px; }ul li a{ display:block; width: 100%; background:#ccc; }ul li a:hover{ background:#999; }说明:display:block;这一行必须要加的,这样才能块状显示!F).LI中的元素水平排列,关键FLOAT:LEFT: ul{list-style-type:none;width:100%;}

    Statement:
    The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn