radial-gradients

SVG with radialGradient not work in browsers

无人久伴 提交于 2020-05-31 01:53:54
问题 Problem: The following svg code not work in browsers: <svg width="207" height="209" viewBox="0 0 207 209" fill="none" xmlns="http://www.w3.org/2000/svg"> <path fill-rule="evenodd" clip-rule="evenodd" d="M96.2318 8.29356C149.379 4.30837 195.684 44.2918 199.657 97.599C203.631 150.906 163.767 197.351 110.62 201.336C57.473 205.321 11.1677 165.338 7.19452 112.031C3.2213 58.7234 43.0847 12.2787 96.2318 8.29356Z" stroke="url(#paint0_angular)" stroke-width="2"/> <defs> <radialGradient id="paint0

Why don't CSS radial gradients work in Edge?

岁酱吖の 提交于 2020-05-16 03:17:22
问题 I got the following solution for diagonal scanlines from an answer to my previous question: html { height:100%; background: radial-gradient(#000 0.5px,transparent 0.5px) 0 0 /3px 3px, radial-gradient(#000 0.5px,transparent 0.5px) 1px 1px /3px 3px, radial-gradient(#000 0.5px,transparent 0.5px) 2px 2px /3px 3px, url(https://i.picsum.photos/id/102/800/800.jpg) center/cover; } The solution works perfectly to reproduce the desired effect in Chrome and Firefox, but doesn't make any difference in

How to do radial line gradient around an image and set the % of it? CSS or SVG or anything can solve the problem

笑着哭i 提交于 2020-01-26 04:02:53
问题 I need to develop the next style: The gradient around the image has diferents colors and can be uncompleted. How can I do that and set the % of it? For people that ask for code: body { height: 100vh; margin: 0; display: grid; place-items: center; background: #222; } .module-border-wrap { max-width: 250px; padding: 1rem; position: relative; background: linear-gradient(to right, red, purple); padding: 3px; } .module { background: #222; color: white; padding: 2rem; } 回答1: I believe you'll need

How does this scrolling shadows CSS-magic work?

限于喜欢 提交于 2020-01-13 19:31:26
问题 I found this infamous article from 2012. It details how to create scrolling shadows and still works beautifully but I really want to understand the solution and I can't seem to find the necessary information online. Here is the minified code originally created (blog-post) by @kizmarh and improved by @leaverou: .scrollbox { overflow: auto; width: 200px; max-height: 150px; background: /* Shadow covers */ linear-gradient(white 30%, rgba(255, 255, 255, 0)), linear-gradient(rgba(255, 255, 255, 0),

How to make a conical gradient in iOS using Core Graphics / Quartz 2D?

梦想与她 提交于 2020-01-09 10:23:45
问题 How can I draw such a conical gradient in iOS using Core Graphics / Quartz 2D API? (source: ods.com.ua) 回答1: If anyone is still looking for a solution, Apple finally introduced .conic gradient type in iOS 12. Perfect for masking to create circular progress bar with gradient. Example: let gradientLayer = CAGradientLayer() gradientLayer.startPoint = CGPoint(x: 0.5, y: 0.5) gradientLayer.endPoint = CGPoint(x: 0.5, y: 0) gradientLayer.type = .conic gradientLayer.colors = [UIColor.red.cgColor,

Resize the radius of a centred radial gradient

久未见 提交于 2020-01-04 03:49:15
问题 I'm restyling my current project and found a simple way to fade the left and right edges of my div background by using the following. I've been experimenting trying to edit the radius of the centered circle, to make it smaller. I can't seem to alter it, without the whole gradient style disappearing. I'm trying to set the yellow area as the background of the text with less gradual fade to transparent. What do I need to do to get more transparent and less colored circle? background-image:

How to cut out a hole with radial gradient in view

一笑奈何 提交于 2020-01-03 04:52:04
问题 I have a transparent light hole view, a view overlay super view, and there is a hole gradient round view in the cover view, the super view is still visiable. I have no idea to implement the gradient light hole view, anyone can help me EDIT ============ I try to add cover view to the full screen, the cover view background color is clear., and add custom CALayer to the cover view layer as sublayer. the cover view implementation: @implementation CoverView - (instancetype)initWithFrame:(CGRect

CABasicAnimation creates empty default value copy of CALayer

谁说胖子不能爱 提交于 2020-01-03 00:58:46
问题 I have a custom CALayer that draws radial gradients. It works great except during animation. It seems that each iteration of CABasicAnimation creates a new copy of the CALayer subclass with empty, default values for the properties: In the screenshot above, you see that CABasicAnimation has created a new copy of the layer and is updating gradientOrigin but none of the other properties have come along for the ride. This has the result of not rendering anything during the animation. Here's a GIF

android create pie dount with gradient

孤街醉人 提交于 2019-12-31 17:06:45
问题 Is there any way to create circle with gradient like this ? As far as i get is this: <shape android:innerRadiusRatio="3" android:thicknessRatio="10" android:shape="ring"> <gradient android:endColor="@color/cyan_dark" android:startColor="@color/red" android:type="radial" android:gradientRadius="340" android:centerX="50%" android:centerY="0" /> </shape> 回答1: XML <ProgressBar android:id="@+id/yourId" style="?android:attr/progressBarStyleHorizontal" android:layout_width="89dp" android:layout

Creating a droplet like border effect in css

旧时模样 提交于 2019-12-28 04:15:49
问题 I created this border design in Photoshop and was wondering if anyone could give me some guidance with how to recreate this using css . 回答1: Creating an effect like this is definitely possible using CSS3 but you would need more than just the border for that. In the below sample, I have used a pseudo-element with a radial-gradient background to mimick the border effect shown in question. Depending on which side should have the border, you can tweak the positioning of the pseudo element to