0 votes
86 views
in HTML by (2.2k points)
edited
How do you add a background color or image to a card in CSS?

1 Answer

0 votes
by (98.9k points)
selected by
 
Best answer

Use the background-color or background-image property in CSS to add a background color or image to a card. Here's an example:



.card {
  background-color: #f0f0f0;
  /* or */
  background-image: url("background.jpg");
}

Related questions

0 votes
1 answer 114 views
0 votes
1 answer 122 views
asked Jun 12, 2023 in HTML by radhe (2.2k points)
0 votes
1 answer 141 views
asked Jun 12, 2023 in HTML by radhe (2.2k points)
0 votes
1 answer 94 views
asked Jun 12, 2023 in HTML by radhe (2.2k points)
0 votes
1 answer 92 views
0 votes
1 answer 115 views

Doubtly is an online community for engineering students, offering:

  • Free viva questions PDFs
  • Previous year question papers (PYQs)
  • Academic doubt solutions
  • Expert-guided solutions

Get the pro version for free by logging in!

5.7k questions

5.1k answers

108 comments

561 users

...