English 中文(简体)
I m试图改变一个集装箱的宽度和高度,在CSS使用:hover,但停工。 我做了什么错误?
原标题:I m trying to change the width and height of a container using :hover in CSS, but it isn t working. What am I doing wrong?
  • 时间:2023-06-12 02:55:21
  •  标签:
  • css
  • hover

I m trying to add a social media banner to the footer of my website. I m using svgs for the actual icons, but I m trying to make a circle which has the background color of the app s logo expand from out of the logo. Like this: Twitter logo without hovering Twitter logo when hovering However, my css isn t working and I m not sure why. Please help!

传真:

<div class="footer-media-container">
      <div class="twitter-footer-media-circle">
        <svg class="twitter-icon-svg"
     width="132.275mm" height="132.275mm"
     viewBox="0 0 500 500">
  <path class="twitter-icon-path"
        fill="#222249" stroke="#222249" stroke-width="1"
        d="M 248.00,170.00
           C 246.45,164.92 245.07,153.37 245.00,148.00
             244.62,115.59 259.85,84.98 286.00,65.75
             303.11,53.17 323.90,46.86 345.00,46.04
             349.55,45.86 350.88,46.42 355.00,46.83
             370.92,48.42 384.14,51.83 398.00,60.20
             402.81,63.11 407.81,66.44 412.00,70.17
             414.81,72.67 418.13,76.94 422.00,77.40
             425.28,77.79 437.34,73.88 441.00,72.67
             464.28,64.93 463.40,63.91 484.00,54.00
             480.20,68.08 469.40,84.89 459.00,94.96
             459.00,94.96 441.00,110.00 441.00,110.00
             441.00,110.00 460.00,106.12 460.00,106.12
             474.80,102.61 482.99,99.94 497.00,94.00
             492.37,104.92 473.08,124.62 464.00,132.83
             464.00,132.83 448.77,146.17 448.77,146.17
             447.31,148.60 448.01,155.86 448.00,159.00
             448.00,159.00 447.00,178.00 447.00,178.00
             446.71,202.44 435.94,243.14 426.80,266.00
             411.20,304.99 386.83,343.19 356.00,371.91
             309.21,415.51 254.21,438.85 191.00,445.17
             191.00,445.17 171.00,447.00 171.00,447.00
             125.13,447.53 87.41,441.57 45.00,423.28
             35.05,418.99 13.53,408.87 6.00,402.00
             6.00,402.00 18.00,403.00 18.00,403.00
             18.00,403.00 37.00,403.00 37.00,403.00
             64.87,402.96 95.26,393.62 120.00,381.25
             129.91,376.29 146.79,367.05 154.00,359.00
             127.80,359.00 101.18,348.45 83.17,328.99
             71.51,316.39 66.20,305.60 60.00,290.00
             74.59,290.67 91.33,293.63 105.00,287.00
             94.53,285.52 83.05,280.78 74.00,275.40
             42.04,256.38 25.00,224.77 25.00,188.00
             25.00,188.00 38.00,193.19 38.00,193.19
             45.90,196.25 61.81,200.95 70.00,199.00
             59.53,193.86 50.34,183.45 43.72,174.00
             22.38,143.51 18.44,96.91 39.00,65.00
             39.00,65.00 50.04,77.00 50.04,77.00
             59.87,87.29 69.90,97.27 81.00,106.20
             120.71,138.12 167.40,159.97 218.00,167.27
             228.35,168.76 237.49,170.00 248.00,170.00 Z" />
</svg>
      </div>
            </div>

CSS:

.footer-media-container {
  position: relative;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  height: 75px;
  width: 180px;
  background-color: none;
  left: 50%;
  transform: translateX(-50%);
  margin-top: 50px;
}
.twitter-footer-media-circle {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 0px;
  height: 0px;
  background-color: #1da0f200;
  -moz-border-radius: 50px;
  -webkit-border-radius: 50px;
  border-radius: 50px;
  transition: 0.25s;
}
.twitter-icon-svg {
  width: 25px;
  height: 25px;
  transition: 0.25s;
  cursor: pointer;
}
.twitter-icon-svg:hover .twitter-icon-path {
  fill: white;
  stroke: white;
  transition: 0.25s;
}
.twitter-icon-svg:hover .twitter-footer-media-circle {
  transition: 0.25s;
  background-color: #1DA1F2;
  width: 45px;
  height: 45px;
}

我预计会得到我在实例图像中显示的情况,但我最后看不到什么;在网页上看不到圈子和icon。

问题回答

暂无回答




相关问题
CSS working only in Firefox

I am trying to create a search text-field like on the Apple website. The HTML looks like this: <div class="frm-search"> <div> <input class="btn" type="image" src="http://www....

jquery ui dialog opens only once

I have a button that opens a dialog when clicked. The dialog displays a div that was hidden After I close the dialog by clicking the X icon, the dialog can t be opened again.

Drop down background url in Safari Issue

selectBox.selectCSS { background: url(/Images/replacementSelectBackground.png) top left no-repeat height:auto; } I have an issue in Safari only where the image is not rendering on top ...

CSS specific for Safari

How do you target specifically safari in css with styles?

Aligning textarea in a form

Ive used the following css code to align my form elements: form { position:relative; } form input { position:absolute; left:11em; } However, the textarea element is not aligned correctly with the ...

Firefox background image horizontal centering oddity

I am building some basic HTML code for a CMS. One of the page-related options in the CMS is "background image" and "stretch page width / height to background image width / height." so that with large ...

CSS problem with page footer

I have defined my page footer in the css file as: #footer { position: absolute; height: 50px; text-align: center; background: #66CCCC; bottom: 0px; left: 0px; width: 100%; height: ...

热门标签