Html CSS:如何在使用 border-radius 时使用 CSS 正确删除边框?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/11455794/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-29 01:37:00  来源:igfitidea点击:

CSS:How to properly remove border using CSS when border-radius is used?

htmlbordercss

提问by harley_woop

I have a div styled like so: Jsfiddle

我有一个这样的 div: Jsfiddle

How can I remove all of the left hand side border, without the ugly curved radius?

如何在没有丑陋弯曲半径的情况下删除所有左侧边框?

Is it possible in CSS? Or is there a hack to do it? (or am I being too picky?)

在 CSS 中可能吗?或者有没有黑客来做到这一点?(还是我太挑剔了?)

Thanks Muchly,

非常感谢,

Harley

哈雷

采纳答案by Andrew McGivery

Is this what you are looking for?

这是你想要的?

border-radius: 0px 6px 6px 0px;

回答by samsamm777

-webkit-border-radius: 0;
-moz-border-radius: 0;
border-radius: 0;

This will override any border radius css.

这将覆盖任何边框半径 css。

回答by atrepp

if you want to remove the border just use : border: 0px;

如果你想删除边框只需使用:border: 0px;