VueJS Lekcja 2

This commit is contained in:
aplikacje committed 2026-10-26 14:34:03 +01:00
1 parent e66b5ebc22
commit 0a308d6145
10 files changed
+373 -2

No files matched your search

@@ -0,0 +1,42 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Start VueJS</title>
<script src="https://unpkg.com/vue@3/dist/vue.global.js"></script>
</head>
<body>
<div id="app">
<p :style="{ fontSize: fontSize + 'px', color, backgroundColor }">element</p>
<h3>Sterowanie stylami</h3>
<p>Rozmiar czcionki: {{fontSize}}px</p>
<input type="range" name="fontSize" id="fontSize" v-model="fontSize" min="16" max="128">
<p>Kolor tła: {{backgroundColor}}</p>
<input type="color" name="backgroundColor" id="backgroundColor" v-model="backgroundColor">
<p>Kolor tekstu: {{color}}</p>
<input type="color" name="color" id="color" v-model="color">
</div>
</body>
<script>
const app = Vue.createApp({
data() {
return {
fontSize: 16,
color: '#000000',
backgroundColor: '#FFFFFF'
}
}
}).mount("#app");
</script>
</html>