Saturday, February 8, 2025

Abdul Salams Backgrkund Remover

<!DOCTYPE html>

<html lang="en">

<head>

    <meta charset="UTF-8">

    <meta name="viewport" content="width=device-width, initial-scale=1.0">

    <title>Background Remover</title>

    <link rel="stylesheet" href="styles.css">

</head>

<body>

    <div class="container">

        <h1>Remove Image Background</h1>

        <form id="uploadForm">

            <input type="file" id="imageInput" accept="image/*" required>

            <button type="submit">Remove Background</button>

        </form>

        <div id="resultContainer">

            <img id="resultImage" src="" alt="Result Image" style="display:none;">

        </div>

    </div>

    <script src="script.js"></script>


/* styles.css */

body {

    font-family: Arial, sans-serif;

    background-color: #f4f4f4;

    display: flex;

    justify-content: center;

    align-items: center;

    height: 100vh;

    margin: 0;

}


.container {

    background: white;

    padding: 20px;

    border-radius: 8px;

    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);

    text-align: center;

}


h1 {

    margin-bottom: 20px;

}


form {

    margin-bottom: 20px;

}


input[type="file"] {

    margin-bottom: 10px;

}


button {

    padding: 10px 20px;

    background-color: #007bff;

    color: white;

    border: none;

    border-radius: 5px;

    cursor: pointer;

}


button:hover {

    background-color: #0056b3;

}


#resultContainer {

    margin-top: 20px;

}


#resultImage {

    max-width: 100%;

    border-radius: 8px;

}

</body>

</html>