Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

405
Visualizações
How to achieve this 'behind text' effect in CSS?

How can I achieve this 'behind text' color effect with CSS?

The text Accessibility for everyone with slanted red block behind the words for everyone

The text The Benefits with an orange block overlapping some of the letters

The text Reach your own goals with a block of colour behind the word goals

about 4 years ago · Santiago Trujillo
2 Respostas
Responde à pergunta

0

These are the rough implementation of all the examples, and you can adjust it according to your need.

h1 span {
  color: #FD1215;
  background: #FFE0E0;
  padding: 5px 10px;
  border-radius: 4px;
  font-size: 25px;
}

h2 {
  color: #10284A;
  margin-top: 40px;
  font-size: 25px;
}

h2 span {
  background: #FC6E6B;
  padding: 5px 18px 5px 8px;
  clip-path: polygon(3% 0, 100% 0%, 90% 100%, 0% 100%);
  border-radius: 2px;
  font-size: 25px;
}

h3 {
  color: #353535;
  margin-top: 40px;
  position: relative;
  font-size: 25px;
  z-index: 1;
}

h3 span {
  width: 100px;
  height: 10px;
  background: #FCC183;
 position: absolute;
 bottom: 0px;
 left: 0px;
 z-index: -1;
}
<h1>Reach your own <span>goals</span></h1>

<h2>Accessbility <span>for everyone</span></h2>

<h3>The Benefits <span></span></h3>

about 4 years ago · Santiago Trujillo Relatório

0

<style>
    h1 {
        padding: 30px 0 8px;
        position: relative;
    }
    h1::before {
        content: "";
        position: absolute;
        left: 7%;
        bottom: 16px;
        width: 150px;
        height: 14px;
        transform: skew(-12deg) translateX(-50%);
        background: rgba(238,111,87,0.5);
        z-index: -1;
    }
</style> 
   
<h1>Sahan</h1>

Try to learn about CSS ::bofre and ::after pseudo element, and skew, transform keywords, maybe background also will be helpful to you!

about 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda