html - 尝试在 tumblr 容器主题周围添加边框
问题描述
我正在尝试为 tumblr 主题添加边框,但似乎无法这样做。通常我只是将代码添加border: 5px solid #fff;
到主题的容器部分并且它可以工作,但是使用这个它不起作用。
.cont {
display: block;
position: absolute;
top: 0px;
left:0;
opacity: 0.6;
overflow:hidden;
width:273px;
height:374px;
background: url('{image:sidebar bg}') repeat ;
border-radius:0px;
opacity:1;
z-index:9999999999;
-moz-osx-font-smoothing: grayscale;
}
解决方案
似乎对我有用:https ://jsfiddle.net/lharby/Lanbk1es/
我为正文添加了灰色背景,以便您可以看到边框。
另请注意,这 background: url('{image:sidebar bg}') repeat ;
在 jsfiddle 中不起作用,因为这是 tumblr 模板语言的一部分。如果要查看实际图像,则需要完整的 url:https://66.media.tumblr.com/1234.jpg
等。
这是完整的CSS:
body {
// added to show white border on .cont element
background: #999999;
}
.cont {
display: block;
position: absolute;
top: 0px;
left:0;
opacity: 0.6;
overflow:hidden;
width:273px;
height:374px;
background: url('{image:sidebar bg}') repeat ; // this won't render in jsfiddle
border-radius:0px;
opacity:1;
z-index:9999999999;
-moz-osx-font-smoothing: grayscale;
border: 5px solid #fff; // added border as per the comment above code.
}
此外,您在 css 中将不透明度设置为 0.6,然后将相同元素设置为 1.0,因此 0.6 将被覆盖。
推荐阅读
- acumatica - 访问登录的用户角色并包含在页面源中
- android - jcenter.bitrary 库支持-v4/26.1.0 无法访问 || 安卓构建 || 离子构建 || 错误
- python - 具有多个值的张量的布尔值在 Pytorch 中不明确
- sqlite - 从 sqlite3 提取数据时定义时间的问题
- axios - 带有 Axios 和 Loopback 的“where”过滤器中的变量
- flutter - flutterBlue.connect(device, timeout: const Duration(seconds: 10),).listen(null); 飘飘然
- image - 如何将 []byte 对象转换为图像并将其作为 jpeg 图像存储在磁盘上
- ruby-on-rails - 使用 AJAX 插入部分表单
- php - 为什么 curl 脚本在使用 INSERT 查询时开始获取冗余值
- cassandra - Caasandra PRIMARY KEY 列“user”不能被限制,因为前面的列“eventtype”不受限制