css 【圆弧】【通过伪类扩大可点击区域】【线性渐变+透明度】【svg画圆+叠加】【滚动条】

.patient-protocol {
  text-shadow: inherit;
  width: @text-type-width;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

// 限定区域字数长度

 


 通过伪类扩大可点击区域

button {
 position: relative;
 /* [其余样式] */
}
button::before {
 content: '';
 position: absolute;
 top: -10px; 
 right: -10px;
 bottom: -10px; 
 left: -10px;
} 

固定高度的CSS(chrome浏览器)

.layout-protocol-item {
  height: 890px;
  overflow: auto;
}

.layout-protocol-item::-webkit-scrollbar {
  width: 0;
}

svg的一个小实现

  ==》 先来看一个svg画圆的公式

 主要用到SVG对应的CSS属性为: stroke, stroke-width, stroke-dasharray, bordrer-radius

  ==》需求: 用svg实现这样的图

因为svg可以叠加图片,所以上面这个分步骤画法如下:

无需给svg容器设置大小使其自适应的方法:

<svg viewBox="0 0 32 32">
<circle r='16' cx='16' cy='16' />
</svg>
svg {
width: 100px;
height: 100px;
transform: rotate(-90deg);
border-radius:50%;
background:red
}

circle {
fill: red;
stroke: #484848;
stroke-width: 32;
stroke-dasharry: 38 100;
}

svg覆盖的方法:https://www.cnblogs.com/xiyangbaixue/p/4150600.html


圆弧 

 

</head>
  <style>
    .wrapper {
      color: red;
      width: 130px;
      height: 100px;
      border-left: 1px solid #484848;
      padding: 10px;
      position: relative;
      margin: 70px;
    }
    .circle-1 {
      position: absolute;
      border-radius: 0% 50% 0% 0%;
      border-right: 1px solid blue;
      border-top: 1px solid blue;
      width: 150px;
      height: 250px;
      top: 120px;
      right: 0px;
    }
    .circle-2 {
      position: absolute;
      border-radius: 0% 0% 50% 0%;
      border-bottom: 1px solid rgb(255, 0, 179);
      border-right: 1px solid rgb(255, 0, 179);
      width: 150px;
      height: 250px;
      top: -250px;
      right: 0px;
    }
    .page {
      margin: 20px;
      width: 240px;
      height: 240px;
      border: 1px solid red;
    }
  </style>
  <body>
    233
    <div class="wrapper">
      456
      <div class="circle-1"></div>
      <div class="circle-2"></div>
    </div>
    <div class="page">hhhh</div>
  </body>
</html>

线性渐变

.test {
background: linear-gradient(
  to right,
  rgba(255, 255, 255, 0.6), // 0.6是设置透明度
  rgba(109, 109, 114, 0.46) 70%,
  rgba(47, 48, 55, 0.4)
);
}

https://www.cnblogs.com/xiaohuochai/p/5294409.html  【滚动条】

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值