details 标签内,不存在 summary 标签时,浏览器会提供默认值[legend]

如果 summary 标签内没有内容,浏览器会以空白内容作为 legend

自定义 summary 内容做 legend

这里是详细内容,可以放置更多的信息。

details 标签配置 [name=example] 属性

[name] 表示一组 detail 标签,组内只存留单个 details 是展开的 - Opening one member of this group causes other members of the group to close

details 标签配置 [name=example] 属性

手风琴效果,减少空间占用,但用户也不能同时查看更多内容

details 加上 [open] 属性,默认展开内容