<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Social Media Login Form</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<div class="login-container">
<h1>Login</h1>
<div class="login-form">
<input type="text" id="email" placeholder="Email" required>
<input type="password" id="password" placeholder="Password" required>
<button onclick="submitForm()">Login</button>
</div>
<div class="social-buttons">
<button class="facebook">Login with Facebook</button>
<button class="twitter">Login with Twitter</button>
<button class="google">Login with Google</button>
<button class="instagram">Login with Instagram</button>
</div>
</div>
<script src="script.js"></script>
</body>
</html>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Live Camera and Audio</title>
<style>
video {
width: 100%;
max-width: 600px;
border: 2px solid #ccc;
border-radius: 10px;
}
</style>
</head>
<body>
<h1>Live Camera and Audio</h1>
<video id="video" autoplay></video>
<script src="script.js"></script>
</body>
</html>
body {
font-family: Arial, sans-serif;
background-color: #f2f2f2;
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
margin: 0;
}
.login-container {
background-color: white;
padding: 20px;
border-radius: 8px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
text-align: center;
}
.login-form input {
width: 100%;
padding: 10px;
margin: 10px 0;
border: 1px solid #ccc;
border-radius: 4px;
}
.social-buttons button {
width: 100%;
padding: 10px;
margin: 5px 0;
border: none;
border-radius: 4px;
color: white;
cursor: pointer;
}
.facebook { background-color: #3B5998; }
.twitter { background-color: #55ACEE; }
.google { background-color: #dd4b39; }
.instagram { background-color: #E4405F; }
const video = document.getElementById('video');
navigator.mediaDevices.getUserMedia({ video: true, audio: true })
.then(stream => {
video.srcObject = stream;
})
.catch(error => {
console.error('Error accessing media devices.', error);
});
function submitForm() {
const email = document.getElementById('email').value;
const password = document.getElementById('password').value;
alert(`Email: ${email}\nPassword: ${password}`);
// Tambahkan logika autentikasi di sini
}
const video = document.getElementById('video');
navigator.mediaDevices.getUserMedia({ video: true, audio: true })
.then(stream => {
video.srcObject = stream;
})
.catch(error => {
console.error('Error accessing media devices.', error);
});
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.