Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to write a CSS style with a border on the TD of Table and no border on the right and left of Table

2025-04-06 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/03 Report--

This article mainly introduces "how to write a CSS style with a frame in Table's TD and no frame on the right and left of Table". In daily operation, it is believed that many people have doubts about how to write a CSS style with a frame in Table's TD and no frame in Table's right and left. The editor consulted all kinds of materials and sorted out a simple and useful method of operation. I hope it will be helpful for you to answer the question of "how to write a CSS style with a border in Table's TD and no border on the right and left of Table"! Next, please follow the editor to study!

For example, such a CSS

The code is as follows:

.td3 {

Font-size: 14px

Color: # FFFFFF

Background-color: # 000000

BORDER-RIGHT: # f6f6f6 1px solid; / / display the right border as 1px, or 0px if you don't want to display it.

BORDER-TOP: # f9f9f9 0px solid; / / display the top border as 1px, or 0px if you don't want to display it.

BORDER-LEFT: # f9f9f9 0px solid;// shows the left border as 1px, or 0px if you don't want to display it.

BORDER-BOTTOM: # f5f5f5 0px solid;// shows the right border as 1px, or 0px if you don't want to display it.

}

Call class= "td3" in the TD that you call to display this style

That's it.

For example:

The code is as follows:

It's just the same. You can be flexible.

For example, you define one.

The code is as follows:

.table1 {}

.table1 td {

Font-size: 14px

Color: # FFFFFF

Background-color: # 000000

BORDER-RIGHT: # f6f6f6 1px solid; / / display the right border as 1px, or 0px if you don't want to display it.

BORDER-TOP: # f9f9f9 0px solid; / / display the top border as 1px, or 0px if you don't want to display it.

BORDER-LEFT: # f9f9f9 0px solid;// shows the left border as 1px, or 0px if you don't want to display it.

BORDER-BOTTOM: # f5f5f5 0px solid;// shows the right border as 1px, or 0px if you don't want to display it.

}

At this point, the study on "how to write a CSS style with a border for Table's TD and no border for Table right and left" is over. I hope to be able to solve everyone's doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report