Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Aprenda Styling Components with CSS | Section
/
Vue.js Fundamentals and App Development

bookStyling Components with CSS

Deslize para mostrar o menu

Vue components can be styled using regular CSS. You define styles inside the <style> section of a component.

<template>
  <h1 class="title">Hello Vue</h1>
</template>

<style>
.title {
  color: #4f46e5;
  font-size: 28px;
}
</style>

The class is applied in the template and styled in the <style> block.

You can use all standard CSS features such as colors, spacing, and typography.

.title {
  color: #111827;
  margin-top: 20px;
  font-weight: bold;
}

Styling components with CSS allows you to control the appearance of your interface while keeping styles organized inside each component.

question mark

Where should you place CSS styles that are specific to a Vue component?

Selecione a resposta correta

Tudo estava claro?

Como podemos melhorá-lo?

Obrigado pelo seu feedback!

Seção 1. Capítulo 19

Pergunte à IA

expand

Pergunte à IA

ChatGPT

Pergunte o que quiser ou experimente uma das perguntas sugeridas para iniciar nosso bate-papo

Seção 1. Capítulo 19
some-alt