Dashed line only css?

2

Does anyone know how to do this dashed line with just css? I already tried with pictures but I could not thank you!

    
asked by anonymous 14.01.2018 / 02:19

2 answers

3

If you want the dash of the form placed in the question image, you can create a class with pseudo-elements ::before and ::after :

/* tirei o underline do "a" apenas para exemplificar no resultado*/
a{
   text-decoration: none;
}

.trasso{
   position: relative;
}

.trasso::before,
.trasso::after{
   content: '';
   border-bottom: 2px solid #090;
   position: absolute;
   top: 100%;
}

.trasso::before{
   width: 5px;
   left: 0;
}

.trasso::after{
   width: 30px;
   left: 10px;
}
<div>
   <p class="trasso">Conheça o projeto</p>
   <a href="#" class="trasso">Conheça o projeto</a>
</div>
    
14.01.2018 / 02:28
3

What to do with linear-gradient

.linha {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #48958C;
    font-size: 2.5rem;
    position: relative;
}
.linha::after {
   content: '';
   position: absolute;
   width: 6rem;
   height: 0.2rem;
   top: 100%;
   left: 0.25rem;
   background: linear-gradient(to right,#48958C 0%, #48958C 15%, transparent 15%, transparent 30%, #48958C 30%)
}
<p class="linha">Conheça o projeto</p>
    
14.01.2018 / 13:37