In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-06 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
Editor to share with you how canvas intercepts fillet pictures, I believe most people do not know much about it, so share this article for your reference, I hope you can learn a lot after reading this article, let's go to know it!
Iframe is not supported
Cross-domain images are not supported
Cannot be used in browser plug-ins
SVG images are not supported on some browsers
Flash is not supported
Ancient browsers and IE are not supported. If you want to confirm whether a browser is supported, you can use it to access http://deerface.sinaapp.com/.
Because my usage scenario is simple, record the exception information, and the exception page is defined by myself, then html2canvas is sufficient.
The purpose of using html2canvas for the first time is to take a screenshot of the whole page and generate a picture for the user to save.
Let's first take a look at what HTML rendered looks like.
The image rendered by HTML can see that the above image has a fillet effect, but when I use html2canvas to convert the image, I found that the image fillet effect is not invalid.
Turned into something like this. After thinking about a lot of solutions, I decided to make the back fillet into a background picture, the background of the middle circle is transparent, and then cover it to the original image through absolute positioning, which is equivalent to a mask effect.
Of course, the DOM node of the mask image must be below the fillet image, similar to
If it is generated, it will be normal.
The code is as follows:
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.