stuff
This commit is contained in:
commit
d5b9c54ea1
27 files changed
+900
No files matched your search
@@ -0,0 +1,34 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>Vue Basics</title>
|
||||
<link
|
||||
href="https://fonts.googleapis.com/css2?family=Jost:wght@400;700&display=swap"
|
||||
rel="stylesheet"
|
||||
/>
|
||||
<link rel="stylesheet" href="styles.css" />
|
||||
<script src="https://unpkg.com/vue@next" defer></script>
|
||||
<script src="app.js" defer></script>
|
||||
</head>
|
||||
<body>
|
||||
<header>
|
||||
<h1>Vue Styling</h1>
|
||||
</header>
|
||||
<section id="assignment">
|
||||
<!-- 1) Fetch the user input and use it as a CSS class -->
|
||||
<!-- The entered class should be added to the below paragraph -->
|
||||
<input type="text" v-model="class1" />
|
||||
<!-- (available classes: "user1", "user2") -->
|
||||
<p :class="[class1, visible ? 'visible' : 'hidden']">Style me!</p>
|
||||
<button @click="visible = !visible">Toggle Paragraph</button>
|
||||
<!-- 2) Use the "visible" and "hidden" classes to show/ hide the above paragraph -->
|
||||
<!-- Clicking the button should toggle between the two options -->
|
||||
|
||||
<!-- 3) Add dynamic inline styling to the below paragraph and let the user enter a background-color -->
|
||||
<input type="text" v-model="color" />
|
||||
<p :style="`background-color: ${color}`">Style me inline!</p>
|
||||
</section>
|
||||
</body>
|
||||
</html>
|
||||
Reference in new issue
Block a user