小编Uby*_*bya的帖子

如何用css淡出/模糊div的边框?

我已经阅读了很多关于这个问题的话题,但到目前为止还没有任何工作.我读过的最简单的方法是使用盒子阴影,但这会导致阴影的颜色与盒子的颜色不同,即使颜色的代码是相同的(#141414).

如何为div框获得淡出/模糊边框?这很难以书面形式解释,所以我制作了这个图像给你的想法(忽略背景).如果你仔细观察,你可以看到混合,颜色是均匀的,褪色到透明.

在此输入图像描述 我说的盒子阴影对我不起作用.

body {
  background-image:url('http://phptesting.altervista.org/tessuto.png');
    background-repeat: repeat;
  }

div {
  width: 300px;
  height: 300px;
    background-color: #141414;
    border: 2px solid #141414;
    box-shadow: 0 0 5px 5px #141414;
    border-radius: 10px;
}
Run Code Online (Sandbox Code Playgroud)
<html>
  <body>
<div></div>
    </body>
  </html>
Run Code Online (Sandbox Code Playgroud)

html css css3

6
推荐指数
1
解决办法
1万
查看次数

为一周中的每一天更改div样式脚本

这是我的项目:http://jsfiddle.net/yL0o1cy0/

.calendar {
  width: 850px;
  height: 500px;
  background-color: #141414;
  border-radius: 10px;
  padding-top: 10px;
  margin-top: 15px;
  margin-left: 15px;
}
#calendartest1 {
  width: 778px;
  height: 200px;
  position: relative;
  margin-left: auto;
  margin-right: auto;
}
#calendartest2 {
  width: 778px;
  height: 200px;
  position: relative;
  margin-left: auto;
  margin-right: auto;
  margin-top: 50px;
}
#calendartest1 h2 {
  color: #999999;
  text-align: center;
  margin-top: 0px;
  margin-bottom: 0px;
}
#calendartest2 h2 {
  color: #999999;
  text-align: center;
  margin-top: 0px;
  margin-bottom: 0px;
}
.day {
  width: 110px;
  float: left;
  border-left: …
Run Code Online (Sandbox Code Playgroud)

javascript css time

4
推荐指数
1
解决办法
491
查看次数

标签 统计

css ×2

css3 ×1

html ×1

javascript ×1

time ×1