I want to add a light gray color to the text only.
I only want the text part to be gray anddo not color between the lines.I don't know which part of the code should be changed.
Thank you very much.
When the background-color of the text is gray, the entire text is united and becomes a lump of gray.
HTML
Payment
■ PayPal
We accept PayPal only.
We usually ship within 5 business days of receiving cleared
payment.
Our return policy, In the only case of unopened item package.
We ships from Japan
This
product. Import duties, taxes, and charges are not
included charges in the item price or shipping cost. These charges are the buyer ’s responsibility.
CSS
.text {
font-size: 16px;
background-color: #EEE;
font-family: Verdana, "Hiragino Kaku GoNic ProN W3", "Hiragino Kaku Gothic ProN", "Meiryo", "Meiryo", sans-serif;
.content p {
color: # 333;
font-size: 16px;
margin: 0 0 10px 0;
font-family: Verdana, "Hiragino Kaku GoNic ProN W3", "Hiragino Kaku Gothic ProN", "Meiryo", "Meiryo", sans-serif;
line-height: 1.5;
When I set line-height to 1.5 for font-size16px, I thought that the line spacing would be free, but the line spacing was free, but the color was all gray for both the text part and the line spacing. I ended up.
Supplemental information (FW/tool version etc.)Use VSCode
-
Answer # 1
Related articles
- css - how to give hover color to white png?
- css background color i want to make only a part of the background color different
- css - i want to change the text color of each menu of navbar
- Vue example to prevent white screen from adding first screen animation
- css - i want to change the background-color for each section, but the color does not change
- css - i want to add bootstrap color
- css - i want to change the color when i press a button in the drawer menu
- i want to color the last li tag of each ul tag with css
- css - i want to specify a gradient color for background
- css - i want to match the background color with the value of data
- css - i want to change the text color of placeholder
- css - grid layout: line spacing specified by padding is broken in ie11
- i want to add a background color while extending the element with css
- html - color in css is not reflected
- how to change the color of characters and elements with css as the boundary of the image
- css - about changing background color height when mouse hovering tab
- background color of header is not reflected in css
- css - i want to change the color of the text on the image when hovering the image
- i want to change the color with css, but it doesn't work
- css - when specifying a color with vscode, the color sample that was in front of # is no longer displayed
- Incomprehensible HTML gaps
- html : Curved page layout
- html : Styling checkbox on activation
- Html page completely full screen of a mobile device, how to implement it?
- javascript : JS Highlighting the active menu item and those that have already been scrolled
- html : When the screen width increases, the layout goes to the left, but it needs to be in the middle, how can you fix it?
- html : Why are the colors not displayed on the site?
- css : I made a grid layout to fix the sidebar, but scrolling gets stuck on the iPad. I feel a little stuck even at PC size.
- html : Css and column-gap
- html : Overflow-x: scroll does not fire when viewport is zoomed out
Since
tags are block elements,
If you add a background color to the
tag, it becomes the background color of the block itself.
If you enclose the text with inline elements and specify a background color,
I think that only inline elements have a background color.