# 新学到一个圆角的写法，现学现卖了

* 抖音：<https://v.douyin.com/iRaJvjbu/>

之前做这种两边是半圆的圆角的时候

经常会计算一下

这个boder-radius至少要高于height的一半

比如现在height是

那一定要高于

比它（40px）小就不是这个效果了

但是比它（40px）大没有问题，大家看

所以呢

有时候这个height因为是动态的

所以我们经常会这样写

写一堆

然后今天我发现一个比较好玩的写法哈

我换行在这写

这样写：calc

然后呢里边写Infinity

乘以一个 1px

大家看效果也是一样的


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://sunzsh.gitbook.io/xiaoshan.bug/xin-xue-dao-yi-ge-yuan-jiao-de-xie-fa-xian-xue-xian-mai-le.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
