css-gradients

CSS “inverse border-radius” outside element's bounding box to create a mobile phone notch design [duplicate]

戏子无情 提交于 2020-01-05 07:07:44
问题 This question already has answers here : border curved css - circle with curved end (2 answers) Closed 9 days ago . I'm trying to create something that looks like a mobile phone with HTML and CSS and I'd like the camera to have something like an "inverted border-radius" that connects it with the frame smoothly. I can't just make it bigger and mask the unwanted area with a pseudoelement with a white background because the screen content might not always be white. Also, I can't use mask-image

CSS “inverse border-radius” outside element's bounding box to create a mobile phone notch design [duplicate]

旧时模样 提交于 2020-01-05 07:07:09
问题 This question already has answers here : border curved css - circle with curved end (2 answers) Closed 9 days ago . I'm trying to create something that looks like a mobile phone with HTML and CSS and I'd like the camera to have something like an "inverted border-radius" that connects it with the frame smoothly. I can't just make it bigger and mask the unwanted area with a pseudoelement with a white background because the screen content might not always be white. Also, I can't use mask-image

Prevent gradient overlay from scrolling

核能气质少年 提交于 2019-12-23 16:40:33
问题 I am trying to put a small gradient on the bottom of a scrolling div. I've based my solution on the accepted answer to this SO thread. The gradient shows up fine, but when I scroll the content in the div, the bottom of the gradient moves. I need it to remain in place so that the content scrolls independently of the gradient. I've tried several combinations of position: fixed , position: relative , and position: relatve to no avail. What have I missed? Relevant markup: <div class=

Make chainmail background theme

社会主义新天地 提交于 2019-12-13 16:06:44
问题 I'd like to make a chainmail like this: I've tried using linear-gradient but it seems not to work background: linear-gradient(#0c0c0c, #222222)!important I expect the output to be like on shown image from imgur. Will linear-gradient work? 回答1: You can do this with radial-gradient I used different colors so we can better see the result: body { margin:0; height:100vh; background: radial-gradient(50% 100%,#000 35%,transparent 50%) 0 0 /10px 10px, radial-gradient(50% 100%,#000 35%,transparent 50%

How to smooth out a CSS gradient transition?

て烟熏妆下的殇ゞ 提交于 2019-12-08 06:45:14
问题 I am creating an interactive touchscreen display using a program called Intuiface and have created some background tiles/squares that I want to make look 'alive' by transitioning slowly between colours. I have used a linear-gradient transition in CSS to do it but the problem is that the transition looks choppy. The program is running 12 visible tiles (it is a very large touchscreen). I have tried using fewer colours and running on more powerful GPUs (I think it is CPU run anyway) but this

CSS Border Image Gradient Not Working in Safari 10

扶醉桌前 提交于 2019-12-07 05:59:25
问题 I ran into an issue with Safari 10 and CSS border image gradients. It works in all other browsers, and even in Safari 9. It even shows up in Safari 10 in online simulators. Please see images below: (I guess that's IE 11, not IE 10. Thanks for the correction!) I assumed it was just my CSS so I really simplfied it and made a fiddle. You can see it at https://jsfiddle.net/tgbuxkee/ It's also generated below too. div { width: 200px; height: 200px; border: 6px solid transparent; -moz-border-image:

How to smooth out a CSS gradient transition?

为君一笑 提交于 2019-12-06 15:49:30
I am creating an interactive touchscreen display using a program called Intuiface and have created some background tiles/squares that I want to make look 'alive' by transitioning slowly between colours. I have used a linear-gradient transition in CSS to do it but the problem is that the transition looks choppy. The program is running 12 visible tiles (it is a very large touchscreen). I have tried using fewer colours and running on more powerful GPUs (I think it is CPU run anyway) but this hasn't helped. body { width: 100wh; height: 90vh; background: linear-gradient(-45deg, #EE7752, #E73C7E,

CSS Border Image Gradient Not Working in Safari 10

时光总嘲笑我的痴心妄想 提交于 2019-12-05 12:48:01
I ran into an issue with Safari 10 and CSS border image gradients. It works in all other browsers, and even in Safari 9. It even shows up in Safari 10 in online simulators. Please see images below: (I guess that's IE 11, not IE 10. Thanks for the correction!) I assumed it was just my CSS so I really simplfied it and made a fiddle. You can see it at https://jsfiddle.net/tgbuxkee/ It's also generated below too. div { width: 200px; height: 200px; border: 6px solid transparent; -moz-border-image: -moz-linear-gradient(top, #f0e2d0 0%, #c08b62 100%); -webkit-border-image: -webkit-linear-gradient(top

Smooth CSS gradients

女生的网名这么多〃 提交于 2019-12-05 01:59:11
I'm learning how to use CSS gradients. My problem is with top to bottom gradients. You can just see the "stops" in the color changing. This is my CSS code #header { width:1000px; height:250px; background:-moz-linear-gradient(top, #BF7A30 30%, #EDD599); background:-webkit-linear-gradient(top, #BF7A30 30%, #EDD599); } Is there a way to smooth out the stops in top to bottom gradients? (this, to my eye, isn't very visible in left to right or right to left gradients) Think's below css will suite your need. CSS : #header { width:1000px; height:250px; /* IE10 Consumer Preview */ background-image: -ms

How to make radial gradients work in Safari?

亡梦爱人 提交于 2019-11-26 11:39:57
问题 I\'m using radial-gradients on a new site that i\'m building, but the colours are rendering differently (much darker) in Safari on desktop. Is there a better cross-browser syntax to use? I\'ve tried different prefixes, but this hasn\'t fixed the issue. The code i\'m using is as follows. .item1 { background: -webkit-radial-gradient( bottom left, farthest-side, rgba(218, 218, 216, 0.5), transparent), -webkit-radial-gradient( bottom right, farthest-corner, rgba(253, 253, 253, 0.5), transparent