Comments on: background-color https://css-tricks.com Tips, Tricks, and Techniques on using Cascading Style Sheets. Thu, 20 May 2021 17:19:24 +0000 hourly 1 https://wordpress.org/?v=6.5.5 By: Amen Machewu https://css-tricks.com/almanac/properties/b/background-color/#comment-1605076 Sat, 19 Nov 2016 19:17:27 +0000 http://css-tricks.com/?page_id=196162#comment-1605076 In reply to Gilead.

backgroud:#333;
background: rgb(0,0,0,0,7);

]]>
By: Amen Machewu https://css-tricks.com/almanac/properties/b/background-color/#comment-1605075 Sat, 19 Nov 2016 19:08:07 +0000 http://css-tricks.com/?page_id=196162#comment-1605075 I like using hex, how can i put gradient in rgb?

]]>
By: Gopal sharma https://css-tricks.com/almanac/properties/b/background-color/#comment-1600617 Wed, 30 Mar 2016 18:46:57 +0000 http://css-tricks.com/?page_id=196162#comment-1600617 Hello,

What is the best value define for “Alfa” in rgba(). Because I always use this Alfa coordinate as decimal(0.1 – 0.9), as transparency declare in rgba(). I know it also have value from “1-255”. But if we want to define a color as simple rgb() is always equal to rgba() if we declare “Alfa” from “1-255”, Please tell me .

]]>
By: Tyler https://css-tricks.com/almanac/properties/b/background-color/#comment-1600615 Wed, 30 Mar 2016 17:28:29 +0000 http://css-tricks.com/?page_id=196162#comment-1600615 In reply to Amrit.

You can overwrite the alpha value on :hover by writing out the CSS property again with the same color and new alpha value.

div{
    background-color: rgba(0,0,0,1);
}
div:hover{
    background-color: rgba(0,0,0,0.7);
}
]]>
By: Amrit https://css-tricks.com/almanac/properties/b/background-color/#comment-1597322 Thu, 01 Oct 2015 17:18:17 +0000 http://css-tricks.com/?page_id=196162#comment-1597322 In rgba() format, is it possible to specify just the alpha value alone? I need to over-write the alpha value alone on hover.

]]>
By: Gilead https://css-tricks.com/almanac/properties/b/background-color/#comment-1596683 Sat, 29 Aug 2015 20:50:49 +0000 http://css-tricks.com/?page_id=196162#comment-1596683 Is there no way to shorten the length of the background color? When making a website, I like using the CSS background color property. However, when using short 3-4 letter words, the background color is the length of the whole page. I sometimes just want to have a small block of color! Please help! Thank you.

]]>