Can we draw Path in CSS ?
-
I have the feeling I've seen it somewhere. But.
Is it possible to draw a svg or path in the new CSS renderer?
-
@oskarsh yes, store it as a base64 string and then use it as
background-image
property. This is demonstrated here:HISE | UI Components | Slider
The knob / slider element can be used to set values with dragging.
(docs.hise.dev)
(scroll down to the next code example).
You can of course hardcode the base64 path directly into CSS if it's not dynamic so for static icons I would prefer this.
-
@oskarsh said in Can we draw Path in CSS ?:
I have the feeling I've seen it somewhere. But.
Is it possible to draw a svg or path in the new CSS renderer?
Yes, it’s definitely possible to work with SVG or paths in the new CSS renderer, but it really depends on what you’re trying to do. If you're using SVG elements directly in your HTML, you can still style them with CSS like before. But if you're trying to create shapes using only CSS, with things like clip-path or mask, the newer CSS features give you more control than they used to. It’s not the same as drawing a full SVG, but for simple shapes and visual effects, it can get the job done. If you're working on something more advanced, getting help from a mobile app development company might also be a good idea. Let us know more about your goal so we can guide you better.
-
Let us know more about what you’re trying to achieve and we can give better advice.
Damn, bots are getting better but this gave it away.