mirror of
https://github.com/SerenityOS/serenity
synced 2024-09-06 08:56:40 +00:00
29 lines
744 B
HTML
29 lines
744 B
HTML
<!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>
|