html - 我想像图片中提到的那样对 div 进行切割

标签 html css

我想像下图那样在 div 上进行切割。我已经做了基本的布局,但我不知道如何进行这些削减。

Demo

最佳答案

你应该使用

border-corner-shape:bevel;
border-radius: 0% 0% 50% 0%;

但它仍然不能在浏览器上工作。这项技术是为将来准备的。 现在我们应该为这一刻做些什么。这里有一种方法:

https://jsfiddle.net/st2gppxz/1/

div {
    height: 250px;
    width: 200px;
    background: url(address of your image);
    position: relative;
}

div:after {
    content: '';
    position: absolute;
    top: 28%; right: 0;
    border-left: 70px solid transparent;
    border-bottom:180px solid white;
    height: 0;
}

关于html - 我想像图片中提到的那样对 div 进行切割,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36673776/

相关文章:

html - :read-only selector not working on select tag?

python - 如何使用 beautifulsoup 获取隐藏输入的值?

javascript - 在 JS 中操作时的 CSS 类 'doubled up'

jquery - Twitter Bootstrap 模态将 html 内容推到左侧

javascript - 如何使用图像作为框架,并在里面滚动?在网站上模拟电话

css - 来自 php header 的 Bootstrap 填充

html - 文本到图像的中心或右上角,并继续以这种方式对齐文本

javascript - 如何使用点击事件获取表格上的值单选?

html - 空白 : pre-line for small cell

php - 从 Wordpress 中删除 WooCommerce 产品图片