View in English

  • Apple Developer
    • Get Started

    Explore Get Started

    • Overview
    • Learn
    • Apple Developer Program

    Stay Updated

    • Latest News
    • Hello Developer
    • Platforms

    Explore Platforms

    • Apple Platforms
    • iOS
    • iPadOS
    • macOS
    • tvOS
    • visionOS
    • watchOS
    • App Store

    Featured

    • Design
    • Distribution
    • Games
    • Accessories
    • Web
    • Home
    • CarPlay
    • Technologies

    Explore Technologies

    • Overview
    • Xcode
    • Swift
    • SwiftUI

    Featured

    • Accessibility
    • App Intents
    • Apple Intelligence
    • Games
    • Machine Learning & AI
    • Security
    • Xcode Cloud
    • Community

    Explore Community

    • Overview
    • Meet with Apple events
    • Community-driven events
    • Developer Forums
    • Open Source

    Featured

    • WWDC
    • Swift Student Challenge
    • Developer Stories
    • App Store Awards
    • Apple Design Awards
    • Apple Developer Centers
    • Documentation

    Explore Documentation

    • Documentation Library
    • Technology Overviews
    • Sample Code
    • Human Interface Guidelines
    • Videos

    Release Notes

    • Featured Updates
    • iOS
    • iPadOS
    • macOS
    • watchOS
    • visionOS
    • tvOS
    • Xcode
    • Downloads

    Explore Downloads

    • All Downloads
    • Operating Systems
    • Applications
    • Design Resources

    Featured

    • Xcode
    • TestFlight
    • Fonts
    • SF Symbols
    • Icon Composer
    • Support

    Explore Support

    • Overview
    • Help Guides
    • Developer Forums
    • Feedback Assistant
    • Contact Us

    Featured

    • Account Help
    • App Review Guidelines
    • App Store Connect Help
    • Upcoming Requirements
    • Agreements and Guidelines
    • System Status
  • Quick Links

    • Events
    • News
    • Forums
    • Sample Code
    • Videos
 

Vidéos

Ouvrir le menu Fermer le menu
  • Collections
  • Toutes les vidéos
  • À propos

Plus de vidéos

  • À propos
  • Résumé
  • Code
  • Redécouvrez l’élément HTML select

    Apprenez à maîtriser pleinement la mise en forme des menus déroulants sur le Web. L'élément HTML select fait l'objet d'une mise à jour majeure avec une nouvelle valeur de la propriété CSS appearance et de nouveaux pseudo-éléments. Découvrez comment les options des menus déroulants peuvent intégrer du contenu enrichi offrant de nouvelles possibilités en HTML. Créez des menus déroulants qui correspondent à votre système de design, tout en conservant l'accessibilité et la robustesse de l'élément par défaut.

    Chapitres

    • 0:00 - Introduction
    • 2:32 - Style the select button
    • 3:47 - Customize the drop-down
    • 5:00 - Go beyond text options
    • 6:50 - The selectedcontent element
    • 7:46 - Fallback for unsupported browsers
    • 8:49 - Next steps

    Ressources

    • WebKit.org - Example website demonstrating Customizable Select
    • WebKit.org - CSS Grid Lanes Field Guide
    • WebKit.org – Report issues to the WebKit open-source project
    • Submit feedback
      • Vidéo HD
      • Vidéo SD

    Vidéos connexes

    WWDC26

    • Découvrez CSS Grid Lanes
    • Nouveautés de WebKit pour Safari 27
  • Rechercher dans cette vidéo…
    • 1:11 - Basic markup

      <label for="sort-select">Sort by</label>
      <select id="sort-select">
          <option>Newest</option>
          <option>Oldest</option>
      </select>
    • 2:37 - Native form control

      select {
       
      }
    • 2:50 - appearance: base-select

      body {
          font-family: Gill Sans, sans-serif;
      }
      
      select {
          appearance: base-select;
      }
    • 3:07 - Style the select button

      select {
          appearance: base-select;
          background-color: var(--green-10);
          border: none;
          padding: 0.6em 1em;
      }
    • 3:08 - Picker icon

      select:open {
          background-color: var(--green-100);
          color: white;
      }
    • 3:29 - Picker icon open state

      select:open {
          background-color: var(--green-100);
          color: white;
      }
      
      select:open::picker-icon {
          content: url(icons/arrow-white.svg);
      }
    • 4:08 - Picker select

      ::picker(select) {
      
      }
    • 4:21 - Picker select spacing

      ::picker(select) {
          appearance: base-select;
          padding: 4px;
          margin-top: 0.5em;
      }
    • 4:28 - Picker select border and shadow

      ::picker(select) {
          appearance: base-select;
          padding: 4px;
          margin-top: 0.5em;
          border: 1px solid rgba(0,0,0,0.2);
          border-radius: 9px;
          box-shadow: 0 4px 20px rgba(0,0,0,0.2);
      }
    • 4:36 - Custom option styles

      option:checked {
          font-weight: 600;
      }
      
      option:not(:checked) {
          color: #777;
      }
    • 4:42 - Picker option checkmark

      option::checkmark {
          content: url(checkmark.svg);
          width: 0.65em;
      }
    • 5:31 - Images in option

      <option value="flower">
          <img src="flowers.svg" alt="">
          <span class="text">Flowers</span>
      </option>
    • 5:52 - Custom option highlight

      option::checkmark {
          display: none;
      }
      
      option:checked {
          background: #00857e;
          color: white;
      }
    • 6:20 - Grid layout in drop downs

      ::picker(select) {
          display: grid;
          grid-template: 
             1fr 1fr / 1fr 1fr 1fr;
          gap: 1rem;
      }
    • 6:43 - Select with image options

      <select>
          <option value="anywhere">
              <img src="icons/all.svg" alt="">
              <span class="text">Everything</span>
          </option>
          <option value="buildings">
              <img src="icons/buildings.svg" alt="">
              <span class="text">Buildings</span>
          </option>
          <option value="flowers">
              <img src="icons/flower.svg" alt="">
              <span class="text">Flowers</span>
          </option>
          
      </select>
    • 7:11 - Select menu

      <select>
          
          
          
          <option>    </option>
          <option>    </option>
          <option>    </option>
      </select>
    • 7:13 - Select menu button

      <select>
          <button>
          
          </button>
          <option>    </option>
          <option>    </option>
          <option>    </option>
      </select>
    • 7:29 - SelectedContent Element

      <select>
          <button>
              <selectedcontent></selectedcontent>
          </button>
          <option>     </option>
          <option>     </option>
          <option>     </option>
      </select>
    • 0:00 - Introduction
    • Introducing Customizable Select, a way to fully style the HTML Select Element in CSS while keeping its built-in accessibility, available in Safari 27 and Chrome 135. Follow along as a "Sort by" menu and a category picker are built to fit right into a photographer's portfolio site.

    • 2:32 - Style the select button
    • Apply `appearance: base-select` to opt into the new styling model, then customize the button with familiar CSS — fonts, background, border, and padding. Use the new `::picker-icon` pseudo-element to swap the dropdown arrow, and the `:open` pseudo-class to change colors when the menu is showing.

    • 3:47 - Customize the drop-down
    • Style the menu itself by applying `appearance: base-select` to the `::picker(select)` pseudo-element. Adjust spacing, borders, and box-shadow, emphasize the active option with the `:checked` pseudo-class, and replace the default checkmark using `::checkmark`.

    • 5:00 - Go beyond text options
    • Place rich content like SVG icons, images, or labels directly inside

    • 6:50 - The selectedcontent element
    • Replace the built-in select button by placing a

    • 8:49 - Next steps
    • Try the demo on webkit.org, experiment with customizable select in your own projects, and test against assistive tools and non-supporting browsers. To see the Grid Lanes layout used to display the photos, watch "Learn CSS Grid Lanes."

Developer Footer

  • Vidéos
  • WWDC26
  • Redécouvrez l’élément HTML select
  • Open Menu Close Menu
    • iOS
    • iPadOS
    • macOS
    • tvOS
    • visionOS
    • watchOS
    • App Store
    Open Menu Close Menu
    • Swift
    • SwiftUI
    • Swift Playground
    • TestFlight
    • Xcode
    • Xcode Cloud
    • Icon Composer
    • SF Symbols
    Open Menu Close Menu
    • Accessibility
    • Accessories
    • Apple Intelligence
    • Audio & Video
    • Augmented Reality
    • Business
    • Design
    • Distribution
    • Education
    • Games
    • Health & Fitness
    • In-App Purchase
    • Localization
    • Maps & Location
    • Machine Learning & AI
    • Security
    • Safari & Web
    Open Menu Close Menu
    • Documentation
    • Downloads
    • Sample Code
    • Videos
    Open Menu Close Menu
    • Help Guides & Articles
    • Contact Us
    • Forums
    • Feedback & Bug Reporting
    • System Status
    Open Menu Close Menu
    • Apple Developer
    • App Store Connect
    • Certificates, IDs, & Profiles
    • Feedback Assistant
    Open Menu Close Menu
    • Apple Developer Program
    • Apple Developer Enterprise Program
    • App Store Small Business Program
    • MFi Program
    • Mini Apps Partner Program
    • News Partner Program
    • Video Partner Program
    • Security Bounty Program
    • Security Research Device Program
    Open Menu Close Menu
    • Meet with Apple
    • Apple Developer Centers
    • App Store Awards
    • Apple Design Awards
    • Apple Developer Academies
    • WWDC
    Read the latest news.
    Get the Apple Developer app.
    Copyright © 2026 Apple Inc. All rights reserved.
    Terms of Use Privacy Policy Agreements and Guidelines