HTMLify

testing
Views: 24 | Author: itintern
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Firefox Specific CSS</title>
    <style>
        /* Default styles for box4 */
        .box4 {
            background-color: green;
            width: 100px;
            height: 100px;
            border-radius: 10px;
        }

        /* Firefox-specific styles */
        .firefox-box4 {
            background-color: blue;
            width: 150px;
            height: 150px;
            border-radius: 20px;
        }
    </style>
</head>
<body>

<div class="box4"></div>

<script>
    // Detect Firefox and apply specific class
    if (navigator.userAgent.indexOf("Firefox") > -1) {
        document.querySelector('.box4').classList.add('firefox-box4');
    }
</script>

</body>
</html>

Comments