html - 尝试在 tumblr 容器主题周围添加边框

标签 html css border 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 模板语言的一部分。如果您想查看实际图片,您需要完整的网址: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 将被覆盖。

关于html - 尝试在 tumblr 容器主题周围添加边框,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56676658/

相关文章:

html - 图像,输入文本并排 : vertical fail

javascript - 将按钮的 ID 传递给表单

android - android webview中的HTML文件输入(android 4.4,kitkat)

jquery - 自定义节点图标在 Fancytree 中不起作用

uiview - UIView 边框中的文本

html - 使用图像制作边框 CSS3

css - float 时奇怪的 div 边框问题

html - 部分的移动 View 看起来很奇怪

php - symfony 2 : using asset for image path in css

html - 事件时更改按钮边框