My intention is to make the landing page background color orange, but I'm encountering an issue where all pages end up with the same color.
I attempted to use scoped
on the landing page to target only that specific page, however, it resulted in the entire page losing its orange background.
The main objective here is to alter only the landing page.
I've already experimented with using HTML and Body instead of the ' * ', but those approaches didn't yield the desired outcome in this scenario either.
landingpage.vue
:
<template>
<div class="container">
<div class=landing>
<h1>Hello.</h1>
<router-link to="/work">
<button id="work" type="button">See my work</button>
</router-link>
<router-link to="/home">
<button id="home" type="button">Go home</button>
</router-link>
</div>
</div>
</template>
<script>
export default {
name: 'Landing',
};
</script>
<style scoped>
* {
background: orange;
}
h1 {
margin-top: 100px;
text-align: center;
font-size: 80px;
color: green;
}
#work {
color: green;
border: none;
font-size: 25px;
text-decoration: none;
margin: 0;
position: absolute;
top: 50%;
left: 50%;
-ms-transform: translate(-50%, -50%);
transform: translate(-50%, -50%);
}
#work:hover {
color: white;
}
#home{
color: green;
border: none;
font-size: 15px;
text-decoration: none;
margin: 0;
position: absolute;
top: 70%;
left: 50%;
-ms-transform: translate(-50%, -50%);
transform: translate(-50%, -50%);
}
#home:hover {
color: white;
}
</style>