src/components/HelloWorld.vue
<template>
<div class="h-screen flex">
<div class="w-1/2 bg-gradient-to-r from-green-500 to-blue-900"></div>
<div class="w-1/2 bg-beige"></div>
</div>
</template>
<script>
export default {
name: 'HelloWorld'
}
</script>
<style scoped>
.bg-beige {
background-color: #f5f5dc; /* Color beige */
}
</style>
src/App.vue
<template>
<img alt="Vue logo" src="./assets/logo.png">
<HelloWorld />
</template>
<script>
import HelloWorld from './components/HelloWorld.vue'
export default {
name: 'App',
components: {
HelloWorld
}
}
</script>
<style>
#app {
font-family: Avenir, Helvetica, Arial, sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
text-align: center;
color: #2c3e50;
margin-top: 60px;
}
</style>
src/main.js
import { createApp } from 'vue'
import App from './App.vue'
import './assets/styles.css';
createApp(App).mount('#app')
src/assets/styles.css
@tailwind base;
@tailwind components;
@tailwind utilities;
This is the project structure (done with vue create
command):
Based on the style “from-green-500 to-blue-900”, the background should be half gradient half beige, but this is what it looks like:
The logo is logo.png
, which is not the problem. What am I missing?