How to make 3 vertical dots using CSS?

前端 未结 8 2013
面向向阳花
面向向阳花 2020-12-23 14:18

I want to have 3 dots on my page to, for example, toggle the display of a contextual menu. How can I achieve this using CSS?

相关标签:
8条回答
  • 2020-12-23 14:30

    If you are using font-awesome, it is as easy as including the .fa-ellipsis-v style. Further documentation is found here: http://fontawesome.io/icon/ellipsis-v/.

    0 讨论(0)
  • 2020-12-23 14:31

    Most voted answer showed me with dotted with 2 column, So I accomplished with below Unicode character.

    <div>&#xFE19;</div>
    

    0 讨论(0)
  • 2020-12-23 14:33

    Unicode includes ⠇ which is the Braille symbol for the letter "U". To use, just use the HTML entity &#10247; in your code.

    0 讨论(0)
  • 2020-12-23 14:39

    using an unicode char

    .test:after {
      content: '\2807';
      font-size: 100px;
      }
    <div class="test"></div>

    using background property

    div {
        width: 100px;
        height: 100px;
        background-image: radial-gradient(circle, black 10px, transparent 11px);
        background-size: 100% 33.33%;
    }
    <div></div>

    shadow

    div {
      width: 30px;
      height: 30px;
      border-radius: 50%;
        background-color: black;
      box-shadow: 0px 40px 0px black, 0px 80px 0px black;
    }
    <div></div>

    pseudo elements

    div {
      position: relative;
      width: 20px;
      height: 20px;
      background-color: black;
      border-radius: 50%;
    }
    
    div:before, div:after {
      content: "";
      position: absolute;
      width: 100%;
      height: 100%;
      left: 0px;
      background-color: inherit;
      border-radius: inherit;
      }
    
    div:before {
      top: 40px;
      }
    
    
    div:after {
      top: 80px;
    }
    <div></div>

    0 讨论(0)
  • 2020-12-23 14:43
    1. With fontawesome.css

      <i class='fa fa-ellipsis-v'></i>
      
    2. With Glyphicons

      <span class="glyphicons glyphicons-option-vertical"></span>
      
    3. With css

      .textSpan:after {
       content: '\2807';
       font-size: 3em;
       color: #2e2e2e
      }
      
    0 讨论(0)
  • 2020-12-23 14:48

    HTML

    <div class="dot"></div>
    

    css:

    .dot{
        width: 10px;
        height: 10px;
        background: red;
        -moz-border-radius: 5px;
        -webkit-border-radius: 5px;
        border-radius: 5px;
    }
    
    0 讨论(0)
提交回复
热议问题