css

css box-shadow for table row?

筅森魡賤 提交于 2021-02-09 11:58:15
问题 Here is my HTML code: <style> .yellow{ background-color: yellow; } td{ width:40px; } tr:first-child { box-shadow: 1px 1px 5px 5px #d99292; } </style> <table> <tr> <td class=yellow>1</td> <td>2</td> </tr> <tr> <td>3</td> <td class=yellow>4</td> </tr> </table> The goal is to have a drop shadow around the first row. The problem is that the background color of cell 4 is obscuring it. My question is: how do I make the drop show show on top of the background of cell 4? edit: see follow-up question:

IOS Image not appearing

試著忘記壹切 提交于 2021-02-09 11:44:08
问题 I'm having trouble with showing an image on an iPhone. Currently, I have a pretty large image, around 9000x4500. I'm trying to show this image resized in an iPhone. I'm working with the simulator now and it just will not show up. I have some pretty simple code here (using phonegap): <!DOCTYPE HTML> <html> <head> <script charset="utf-8" src = "jquery-1.10.1.min.js"></script> <script charset="utf-8" src = "cordova.js"></script> <style> img.Image { width: 100%; max-width:100%;} </style> </head>

How to round font-awesome icons?

隐身守侯 提交于 2021-02-09 11:32:26
问题 I am trying to round font-awesome icon. Please refer - http://jsfiddle.net/JfGVE/1704/ The problem is, not matter what, the rounded icon is more oval. Not able to make it a perfectly rounded. Below is the css code i have - i { display: inline-block; background: gray; color: white; border-radius: 50%; padding: 5px; } 回答1: Try to adjust height/width and reset line-height: i { display: inline-block; background: gray; color: white; border-radius: 50%; padding: 0.3em; /* adjust padding */ line

Filling cells starting from the bottom in CSS Grid

China☆狼群 提交于 2021-02-09 11:16:46
问题 I have a CSS grid with 3 rows. There may be less than 3 items to fill it, and I want to start filling it from the bottom. I've created a jsFiddle for you to play with, but it currently fails to do what I want. html, body, div { height: 100%; } div { display: grid; grid-template-columns: 1; grid-template-rows: repeat(3, 1fr); /* MISSING RULE */ } <div> <p>Last item</p> <p>Second last item</p> <p>Top item</p> </div> Actual output: Last item Second last item Top item Desired output: Top item

Filling cells starting from the bottom in CSS Grid

不打扰是莪最后的温柔 提交于 2021-02-09 11:15:58
问题 I have a CSS grid with 3 rows. There may be less than 3 items to fill it, and I want to start filling it from the bottom. I've created a jsFiddle for you to play with, but it currently fails to do what I want. html, body, div { height: 100%; } div { display: grid; grid-template-columns: 1; grid-template-rows: repeat(3, 1fr); /* MISSING RULE */ } <div> <p>Last item</p> <p>Second last item</p> <p>Top item</p> </div> Actual output: Last item Second last item Top item Desired output: Top item

CSS Linear gradient is inaccurate?

前提是你 提交于 2021-02-09 09:24:34
问题 For my application I'm looking to make a color palette that can serve any color hue from 0 degrees to 360 degrees. I'm currently using this code to make the palette. Let's use hue 120 (pure green) as an example: function drawPalette(hue) { var ctx = document.querySelector("canvas").getContext("2d"); let w = ctx.canvas.width; let h = ctx.canvas.height; var grH = ctx.createLinearGradient(0, 0, w, 0); grH.addColorStop(0, '#fff'); grH.addColorStop(1, 'hsl(' + hue + ', 100%, 50%)'); ctx.fillStyle

HTML Dropdown box shifting html elements downwards

雨燕双飞 提交于 2021-02-09 09:22:42
问题 So I'm trying to make a dropdown list overlap the elements below when expanded. Unfortunately, even when elements in the same stacking context have a position, and dropdown container div set to a z-index of 2, the issue still persists; instead of overlapping the elements below, it shifts them down. I have also attempted shuffling around the stacking context by adding the opacity property to various elements, but that hasn't worked either. The code can be seen below: #firstone { z-index: 2; }

CSS Linear gradient is inaccurate?

孤者浪人 提交于 2021-02-09 09:22:21
问题 For my application I'm looking to make a color palette that can serve any color hue from 0 degrees to 360 degrees. I'm currently using this code to make the palette. Let's use hue 120 (pure green) as an example: function drawPalette(hue) { var ctx = document.querySelector("canvas").getContext("2d"); let w = ctx.canvas.width; let h = ctx.canvas.height; var grH = ctx.createLinearGradient(0, 0, w, 0); grH.addColorStop(0, '#fff'); grH.addColorStop(1, 'hsl(' + hue + ', 100%, 50%)'); ctx.fillStyle

CSS Linear gradient is inaccurate?

倖福魔咒の 提交于 2021-02-09 09:21:50
问题 For my application I'm looking to make a color palette that can serve any color hue from 0 degrees to 360 degrees. I'm currently using this code to make the palette. Let's use hue 120 (pure green) as an example: function drawPalette(hue) { var ctx = document.querySelector("canvas").getContext("2d"); let w = ctx.canvas.width; let h = ctx.canvas.height; var grH = ctx.createLinearGradient(0, 0, w, 0); grH.addColorStop(0, '#fff'); grH.addColorStop(1, 'hsl(' + hue + ', 100%, 50%)'); ctx.fillStyle

CSS Linear gradient is inaccurate?

余生颓废 提交于 2021-02-09 09:20:40
问题 For my application I'm looking to make a color palette that can serve any color hue from 0 degrees to 360 degrees. I'm currently using this code to make the palette. Let's use hue 120 (pure green) as an example: function drawPalette(hue) { var ctx = document.querySelector("canvas").getContext("2d"); let w = ctx.canvas.width; let h = ctx.canvas.height; var grH = ctx.createLinearGradient(0, 0, w, 0); grH.addColorStop(0, '#fff'); grH.addColorStop(1, 'hsl(' + hue + ', 100%, 50%)'); ctx.fillStyle