html - 特定 Angular 的边框半径在移动设备上不起作用

标签 html css

我正在尝试使用border-radius-top-left等,但是当我在手机上查看页面时,它会将其视为只是边框半径并将其应用于所有 Angular 。当我在桌面上查看它时,它工作正常。

.container {
    display: inline-block;
    float: left;
    width: calc(90vw - 20px);
    margin: 0 5vw;
    background: rgba(255,255,255,0.05);
    font-size: 15px;
    color: #ffffff;
    height: 40px;
    padding: 0 10px;
    outline: none;
    margin-top: 25px;
    border-top-left-radius: 3px;
    border-top-right-radius: 3px;
    border: 1px solid rgba(255,255,255,0.25);
}

不确定这是否相关,但 CSS 正在应用于 <input> .

最佳答案

没关系,可能您使用的是旧版本的浏览器,它不支持 border-radius-top-left 等。

但要确保添加此行:

border-radius: 0;  // Add this line
border-top-left-radius: 3px;
border-top-right-radius: 3px;

关于html - 特定 Angular 的边框半径在移动设备上不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39759076/

相关文章:

html - 在 HTML5 或 svg 文件或 css 中缩放 SVG

jquery - 通过下拉菜单创建新的输入字段,如何将新输入限制为每个只有 1 个?

php - 为什么表单不阻止提交?

javascript - Angular 7 动画导致 webkit 浏览器上的 z-index 重叠问题

添加新元素后 JavaScript 不起作用

javascript - 无法弄清楚使 Prev/Next 按钮工作所必需的 javascript

Javascript 常见问题解答下拉列表

html - 填充 float 元素之间的空间

html - css内容高度100%为滚动页面

jquery - :visible not working with :nth-child selector