mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-26 09:30:24 +00:00
28 lines
744 B
HTML
28 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>
|