質問編集履歴

1

CSSにホバーの追加

2022/01/28 07:38

投稿

shin
shin

スコア10

test CHANGED
File without changes
test CHANGED
@@ -10,6 +10,31 @@
10
10
  </ul>
11
11
  ```
12
12
  ```css
13
+ .card-item a{
14
+ text-decoration: none;
15
+ position: relative;
16
+ display: inline-block;
17
+ transition: .3s;
18
+ }
19
+ .card-item a::after {
20
+ position: absolute;
21
+ bottom: .3em;
22
+ left: 0;
23
+ content: '';
24
+ width: 100%;
25
+ height: 1px;
26
+ background-color: #9e9063;
27
+ opacity: 0;
28
+ transition: .3s;
29
+ }
30
+ .card-item a:hover::after {
31
+ bottom: 1;
32
+ opacity: 1;
33
+ }
34
+ .card-item {
35
+ margin: 5px;
36
+ width: calc(50% - 10px);
37
+ }
13
38
  .card-item{
14
39
  font-family: YuMincho;
15
40
  font-weight: 500;