设计专注于 CSS 的元素

王林
王林 转载
2023-08-28 15:01:02 808浏览

设计专注于 CSS 的元素

要选择具有焦点的元素,请使用:焦点选择器。您可以尝试运行以下代码来实现:焦点选择器 -

示例

<!DOCTYPE html>
<html>
   <head>
      <style>
         input:focus {
            background-color: green;
         }
      </style>
   </head>
   <body>
      <form action = "">
         Subject <input type = "text" name = "subject"><br>
         Student: <input type = "text" name = "student"><br>
         Age: <input type = "number" name" = age><br>
         <input type = "submit" value="Submit">
      </form>
   </body>
</html>

以上就是设计专注于 CSS 的元素的详细内容,更多请关注php中文网其它相关文章!

声明:本文转载于:tutorialspoint,如有侵犯,请联系admin@php.cn删除