本文的目的是使用框阴影来创建手风琴悬停效果。
方法: CSS box-shadow 属性用于在元素周围绘制阴影。 CSS box-shadow 属性具有以下语法。
句法:
box-shadow : x-offset y-offset blur-radius spread-redius color
HTML
Hover mouse over this accordion to see box-shadow
in action. After that click on accordion to show
its content.
A Computer Science portal for geeks. It contains
well written, well thought and well explained
computer science and
programming articles, quizzes
and videos.
输出:您可以看到悬停效果的红色阴影。
- 点击之前:我们看到如下网页。
- 单击后:您会看到“GeeksForGeeks”手风琴的内容。