【问题标题】:Is there a way to change the color of the arrow/twistie of the Details element by using HTML only? [duplicate]有没有办法通过仅使用 HTML 来更改 Details 元素的箭头/扭曲的颜色? [复制]
【发布时间】:2021-11-01 20:10:17
【问题描述】:

我在 HTML 中使用 details 元素,但我不能使用 CSS。只有 HTML。

<details>
    <summary>Details</summary>
    Something small enough to escape casual notice.
</details>

这给了我一个黑色箭头。是否可以仅使用 HTML 更改颜色或箭头以及大小/样式?我不能使用 CSS。

【问题讨论】:

  • 如果不使用 CSS,您将无法做到这一点。 HTML 仅用于定义文档的结构,样式应该在 CSS 中完成。所以一般来说,不使用 CSS 是不可能改变任何东西的样式的。

标签: html styles


【解决方案1】:

没有。 默认元素为黑色,要更改它,必须使用 CSS。
您可以在 HTML 中使用 CSS 内联,通过添加到样式标签

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2020-07-09
    • 2020-10-02
    • 1970-01-01
    • 2020-02-14
    • 1970-01-01
    • 2017-03-04
    • 1970-01-01
    相关资源
    最近更新 更多