大约有 10,336 项符合查询结果(耗时:0.0267秒) [XML]
How to make a element expand or contract to its parent container?
The goal is to have the <svg> element expand to the size of its parent container, in this case a <div> , no matter how big or small that container may be.
...
How to place and center text in an SVG rectangle
...
An easy solution to center text horizontally and vertically in SVG:
Set the position of the text to the absolute center of the element in which you want to center it:
If it's the parent, you could just do x="50%" y ="50%".
If it's another element, x would be the x of that element + h...
Add custom icons to font awesome
...want to use it for most of the icons on my site but there are a few custom svg icons that I'd need in addition to what's offered.
...
Embedding SVG into ReactJS
Is is possible to embed SVG markup into a ReactJS component?
4 Answers
4
...
Isn't it silly that a tiny favicon requires yet another HTTP request? How can I put the favicon into
...l fairly recently, most browsers have not been able to handle favicons in .svg format.
That's not the case anymore.
See: https://caniuse.com/#feat=link-icon-svg
1) Choose SVG as the Favicon format
Right now, in June 2020, these browsers can handle SVG Favicons:
Chrome
Firefox
Edge
Opera
Chrome for...
Convert an image to grayscale in HTML/CSS
...s answer, and also Roman Nurik's answer, and relaxing somewhat the the 'no SVG' requirement, you can desaturate images in Firefox using only a single SVG file and some CSS.
Your SVG file will look like this:
<?xml version="1.0" encoding="UTF-8"?>
<svg version="1.1"
baseProfile="full"...
What's the best way to make a d3.js visualisation layout responsive?
Assume I have a histogram script that builds a 960 500 svg graphic. How do I make this responsive so on resize the graphic widths and heights are dynamic?
...
What is the difference between svg's x and dx attribute?
What is the difference between svg's x and dx attribute (or y and dy)? When would be a proper time to use the axis shift attribute (dx) versus the location attribute (x)?
...
Fast and responsive interactive charts/graphs: SVG, Canvas, other?
...to test. So here are four possible implementations, two each of Canvas and SVG:
Canvas geometric zooming
Canvas semantic zooming
SVG geometric zooming
SVG semantic zooming
These examples use D3's zoom behavior to implement zooming and panning. Aside from whether the circles are rendered in Canva...
How to convert a SVG to a PNG with ImageMagick?
I have a SVG file that has a defined size of 16x16. When I use ImageMagick's convert program to convert it into a PNG, then I get a 16x16 pixel PNG which is way too small:
...