screen_rotation
Copied to Clipboard
<!DOCTYPE html> <html> <head> <meta charset="UTF-8" /> <script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script> </head> <body> <div id="app"> <h3>Vue Js v-show Example</h3> <h2 v-show="showList">Shopping List</h2> <ul v-show="showList"> <li>Apples</li> <li>Bananas</li> <li>Oranges</li> </ul> <button @click="toggleList">Toggle List</button> </div> <script> new Vue({ el: '#app', data() { return { showList: true }; }, methods: { toggleList() { this.showList = !this.showList; } } }); </script> <style> #app { text-align: center; font-family: Arial, sans-serif; padding: 20px; } h3 { font-size: 24px; margin-bottom: 20px; color: #333; } h2 { font-size: 20px; margin-top: 10px; color: #333; } ul { list-style-type: none; padding: 0; } li { font-size: 18px; margin: 10px 0; color: #555; } button { background-color: #007BFF; color: white; padding: 10px 20px; border: none; cursor: pointer; font-size: 16px; border-radius: 5px; } button:hover { background-color: #0056b3; } </style> </body> </html>