关于html:如何从此圆形图标删除黑色边框?

How to remove black border from this round icon?

鼠标悬停可将背景更改为黑色,但我想删除黑色边框,并将图标显示为圆圈。

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
.our-activity-div {
  padding: 20px;
  text-align: center;
}

.our-activity-inner {
  width: 33%;
  box-sizing: border-box;
  display: inline-block;
}

.fundraising {
  max-width: 75%;
  min-height: 220px;
  box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
  text-align: center;
  border-radius: 10px;
  margin: 0 auto;
  line-height: 0px;
  padding: 30px 35px;
  box-sizing: border-box;
}

.fundraise-hr {
  width: 25%;
  border-color: #000;
}

.fundraise-padding {
  text-align: left;
  padding-top: 20px;
}

.fundraising-parag {
  padding: 10px 5px;
  line-height: 1.5em;
}

.symbol0 {
  color: #000;
  font-size: 100px;
  position: relative;
  top: -28px;
  border-radius: 50%;
}

.fundraising:hover .fundraise-padding {
  color: #01d262;
}

.fundraising:hover .fundraise-hr {
  border-color: #01d262;
}

.fundraising:hover .symbol0 {
  background-color: #000;
  color: #01d262;
}
1
2
3
4
5
6
      <span class="symbol0"> </span>
      <h2 class="fundraise-padding">Fundraising
      <hr class="fundraise-hr"></hr>
      <p class="fundraising-parag">
        Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis
      </p>


删除以下代码中的背景色:

1
2
3
4
.fundraising:hover .symbol0 {
  background-color: #000;
  color: #01d262;
}

尝试跟随css

1
2
3
span.symbol0:hover {
    background: none !important;
}


从CSS中的.fundraising:hover .symbol0移除背景颜色

并在:hover上将伪元素用作:after并设置演示背景

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
.our-activity-div {
  padding: 20px;
  text-align: center;
}

.our-activity-inner {
  width: 33%;
  box-sizing: border-box;
  display: inline-block;
}

.fundraising {
  max-width: 75%;
  min-height: 220px;
  box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
  text-align: center;
  border-radius: 10px;
  margin: 0 auto;
  line-height: 0px;
  padding: 30px 35px;
  box-sizing: border-box;
}

.fundraise-hr {
  width: 25%;
  border-color: #000;
}

.fundraise-padding {
  text-align: left;
  padding-top: 20px;
}

.fundraising-parag {
  padding: 10px 5px;
  line-height: 1.5em;
}

.symbol0 {
  color: #000;
  font-size: 100px;
  position: relative;
  top: -28px;
  border-radius: 50%;
}

.fundraising:hover .fundraise-padding {
  color: #01d262;
}

.fundraising:hover .fundraise-hr {
  border-color: #01d262;
}

.fundraising:hover .symbol0 {
  color: #01d262;
}

.fundraising:hover .symbol0:after {
  content: '';
  background-color: #000;
  position: absolute;
  width: 80%;
  height: 50%;
  top: 24px;
  z-index: -1;
  left: 9px;
  border-radius: 50%;
}
1
2
3
4
5
6
      <span class="symbol0"> </span>
      <h2 class="fundraise-padding">Fundraising
      <hr class="fundraise-hr"></hr>
      <p class="fundraising-parag">
        Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis
      </p>