Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
这是我的CSS:
#social #twitter { background-image: url("../img/twitter.svg"); max-height: 32px; max-width: 32px; }
我的 HTML 看起来像这样:
<div id="social"> <div id="twitter"></div> </div>
SVG 不会缩小到 32x32。SVG 为 512x512。有人可以帮助我吗?谢谢。
尝试添加
background-size: contain;
到 CSS。有关支持的浏览器和浏览器版本的详细信息和表格,请参阅MDN 文档。background-size
background-size
我正在将一个旧的 krufty 应用程序升级到 Rails 3.1。该公司一直在使用 RSpec 和 Capybara 进行验收测试。我们有一些验收测试spec/acceptance失败,并显示以下消息:
spec/acceptance
Failure/Error: get @url NoMethodErr
Reference php × 1429865 c/c++ × 756500 nginx × 49975 mongodb × 159057 mybatis × 3233 anaconda × 13410 pycharm × 14671 python × 1902243 vscode × 56040 docker × 110988 github × 49000 flask × 49129 ffmpeg × 24037 jmeter × 16910 matplotlib × 63493 bootstrap × 54641