screen_rotation
Copied to Clipboard
<!DOCTYPE html> <html> <head> <meta charset="UTF-8" /> <script src="https://unpkg.com/react@17.0.2/umd/react.development.js"></script> <script src="https://unpkg.com/react-dom@17.0.2/umd/react-dom.development.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/babel-standalone/6.26.0/babel.min.js"></script> </head> <body> <div id="app"></div> <script type="text/babel"> function App() { return ( <div className='container'> <h3>React Js set Placeholder on Input Field</h3> <input type="text" placeholder="Enter your name" /> </div> ); } ReactDOM.render(<App />, document.getElementById('app')); </script> <style> .container { max-width: 500px; margin: 0 auto; padding: 20px; border-radius: 8px; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); text-align: center; } input[type="text"] { width: 100%; padding: 10px; border: 1px solid #ccc; border-radius: 4px; font-size: 16px; margin-bottom: 10px; box-sizing: border-box; } input[type="text"]:focus { border-color: #3498db; box-shadow: 0 0 6px rgba(52, 152, 219, 0.5); } </style> </body> </html>