summaryrefslogtreecommitdiff
path: root/Base/res/html/misc/focus.html
blob: a85d54f548d7387f4f18db407036af5258586b9f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>:focus and :focus-within test</title>
    <style>
        :focus {
            background-color: magenta;
        }
        p.focus-within-test:focus-within {
            background-color: lime;
        }
    </style>
</head>
<body>
    <h1>:focus and :focus-within test</h1>
    <p>
        Anything with :focus will have a magenta background.
        <button>I'm a button</button>
        <input type="text" value="Hello friends!"/>
    </p>
    <p class="focus-within-test">
        This paragraph will turn green if anything inside it is focused.
        <button>I'm a button</button>
        <input type="text" value="Hello friends!"/>
    </p>
</body>
</html>