CSS - cunhapaulo/Referencecard GitHub Wiki
section.chapter {
position: relative;
z-index: 1;
color: var(--marpx-theme-chapter-h1-font-color); /* Garante que o texto tenha cor */
background-color: #111622;
}
section.chapter::before {
content: "";
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-image: url("https://cunhapaulo.github.io/assets/pattern05.png");
background-size: cover;
background-repeat: no-repeat;
background-position: center;
opacity: 0.1; /* Aplica transparência apenas ao fundo */
z-index: -1; /* Coloca o fundo atrás do texto */
}- Código:
img[alt~="center"] {
display: block;
margin: 0 auto;
}- Exemplo de uso:

- Código:
<style>
.texto-italico-amarelo {
font-style: italic;
color: yellow;
}
</style>- Exemplo de uso:
<p>Este texto não está estilizado.
<span class="texto-italico-amarelo">
Este texto está em itálico e amarelo
</span> e este texto novamente não está estilizado.
</p>- Código:
<style>
i {
font-style: normal; /* Remove o itálico */
color: green; /* Define a cor do texto como verde */
}
i.destaque {
font-weight: bold; /* Deixa o texto em negrito */
}
</style>- Exemplo de uso:
<p>Este é um texto normal.</p>
<i>Este texto está em itálico (padrão).</i>
<p>Este é outro texto normal.</p>
<i class="destaque">Este texto em itálico está em negrito.</i>
<p>Este é outro texto normal.</p>
<i>Este texto em itálico é verde.</i>https://www.cdnfonts.com/oak-sans.font
- Start by defining the
@font-facerule and give it a name. Inside the rule, specify thefont-familyproperty with the desired name for your font.
@font-face {
font-family: MyCustomFont;
}- Specify the source of the font file using the
srcproperty. You can provide the path to a local font file or a URL to a font hosted online. Make sure to include different file formats to support cross-browser compatibility.
@font-face {
font-family: MyCustomFont;
src: url('path/to/font.ttf') format('truetype'),
url('path/to/font.woff') format('woff'),
url('path/to/font.eot') format('embedded-opentype');
}- Once you have defined the
@font-facerule, you can use the specifiedfont-familyname in your CSS styles to apply the embedded font to specific elements.
body {
font-family: MyCustomFont, Arial, sans-serif;
}In this example, the font specified in the @font-face rule will be applied to the body element, and if the font is not available, it will fallback to Arial and then to a generic sans-serif font.