screen_rotation
Copied to Clipboard
<html> <head> <script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script> </head> <body> <div id="app"> <h3>Vue Js Show Hide Element</h3> <p v-show="show">FOnt Awesome Icons</p> <button @click="show = !show">Toggle</button> </div> <script type="module"> const app = new Vue({ el: "#app", data() { return { show: true } }, }); </script> <style> /* Styles for the container div */ #app { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100vh; background-color: #f7f7f7; font-family: Arial, sans-serif; } /* Styles for the heading */ h3 { margin-bottom: 20px; font-size: 24px; font-weight: bold; text-align: center; } /* Styles for the paragraph element that will be shown/hidden */ p { font-size: 18px; margin-top: 20px; text-align: center; } /* Styles for the toggle button */ button { padding: 10px 20px; border: none; background-color: #333; color: #fff; font-size: 16px; cursor: pointer; transition: background-color 0.3s ease-in-out; } button:hover { background-color: #666; } </style> </body> </html>