C
C
crdrads2018-12-10 21:31:08
linux
crdrads, 2018-12-10 21:31:08

Why is it said that clip and mask are better for SVG than native CSS?

On this forum and in many articles, they say that clip and mask are best done using SVG, not CSS. Today I spent a whole day researching this issue and I dare to say that it looks like a lie or a delusion! But nevertheless I ask for advice, whether the conclusions are correct.
I've identified and tried the following methods:
1. CSS clip-path: Everything works fine in Chrome, FF, Android and iPhone 6 mobile Safari, though it doesn't work in Edge
2. SVG clip-path for SVG elements: This also works fine, BUT there are terrible disadvantages - it's actually impossible to make a responsive clip (i.e. it will be hardcoded in pixels), and also the picture in the tag imageis dead for SEO, and image optimization - there is no alt or srcset, which is like death for me!
3. SVG clip-path for HTML elements: not working in Safari, Edge + inability to make responsive
4. CSS mask-image: everything is fine, works in Edge too!
5. SVG mask for SVG elements: all minuses p2.
6. SVG mask for HTML elements: all the disadvantages of point 3 + does not work in regular Chrome (WTF)
So, how can SVG be better, enlighten me? I'm already silent how many circles of hell I had to go through to figure out the SVG nuances that were not really described anywhere in order to understand all this.

Answer the question

In order to leave comments, you need to log in

6 answer(s)
D
Dmitry, 2016-01-24
Nevakshonov @nevakshonov

If the IP is dynamic, then it will not work. You need a static IP, a registered domain. You can register a domain for free on dot.tk, where you bind it to your IP. And actually everything should work. Static IP can be ordered from a provider for a separate fee. If the IP is static on the virtual machine, configure the firewall, forward the ports. You can really follow the advice of the previous speaker and register Hosting, you don’t even have to pay if the site is not big, register on Hostinger.ru, bind its IP to the .tk domain and you will be happy for free. =)

M
Maxim Grechushnikov, 2016-01-24
@maxyc_webber

Well, here I start from port forwarding, the firewall of the host system, setting up Apache in order to revoke by IP. and plus you will not be able to hang a domain on your DYNAMIC IP. better not fool your head and take hosting. $100 a month is worth the headache

D
Dima, 2016-01-24
@CrazyFail

Let me disagree with the above. And with a dynamic IP, everything is possible if you read the material on Habré, for example, but it's not worth it. And if you just show the site at once, then you need to start, as suggested above, with port forwarding, VM settings, router / router (if any), there is a sufficient amount of materials on the Internet on this topic.

M
Maksim, 2016-01-25
@chumayu

Oh fuck how everything is running .... and configured.
1.Virtualbox on your virtual machine set to NAT in the network section.
2. Forward the necessary ports to the desired IP (even if at first it is dynamic then change to static) (now your virtual machine is visible to you and visible to everyone else on the local network)
3. From the outside on the router, forward ports to real. machines on the same port as the virtual one, and that's how it is visible to the whole country.
Note:
Please note that the port that you are forwarding is not occupied on your local machine by some Skype or teamviewer.

S
SierraMadre, 2016-01-28
@SierraMadre

And DDNS will not work?

C
chubokabrik, 2018-12-10
@chubokabrik

I also think that CSS is more practical, but in projects like this https://motovskikh.ru/russia/ CSS will not work.
Everything depends on the case.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question