- xml - AJAX/Jquery XML 解析
- 具有多重继承的 XML 模式
- .net - 枚举序列化 Json 与 XML
- XML 简单类型、简单内容、复杂类型、复杂内容
我想创建一个形状,我将其描述为“反圆”:
图片有点不准确,因为黑线应该沿着 div 元素的外边界继续。
这是我目前拥有的演示:http://jsfiddle.net/n9fTF/
没有图像的 CSS
甚至可能吗?
最佳答案
(对于那些支持它的浏览器——在 FF 和 Chrome 中测试——IE10,Safari 应该也可以)。
我的原始答案的一个“问题”是那些没有坚实背景的情况。此更新创建了相同的效果,允许在圆和它的反向切口之间有一个透明的“间隙”。
CSS
.inversePair {
border: 1px solid black;
display: inline-block;
position: relative;
height: 100px;
text-align: center;
line-height: 100px;
vertical-align: middle;
}
#a {
width: 100px;
border-radius: 50px;
background: grey;
z-index: 1;
}
#b {
width: 200px;
/* need to play with margin/padding adjustment
based on your desired "gap" */
padding-left: 30px;
margin-left: -30px;
/* real borders */
border-left: none;
-webkit-border-top-right-radius: 20px;
-webkit-border-bottom-right-radius: 20px;
-moz-border-radius-topright: 20px;
-moz-border-radius-bottomright: 20px;
border-top-right-radius: 20px;
border-bottom-right-radius: 20px;
/* the inverse circle "cut" */
background-image: -moz-radial-gradient(
-23px 50%, /* the -23px left position varies by your "gap" */
circle closest-corner, /* keep radius to half height */
transparent 0, /* transparent at center */
transparent 55px, /*transparent at edge of gap */
black 56px, /* start circle "border" */
grey 57px /* end circle border and begin color of rest of background */
);
background-image: -webkit-radial-gradient(-23px 50%, circle closest-corner, rgba(0, 0, 0, 0) 0, rgba(0, 0, 0, 0) 55px, black 56px, grey 57px);
background-image: -ms-radial-gradient(-23px 50%, circle closest-corner, rgba(0, 0, 0, 0) 0, rgba(0, 0, 0, 0) 55px, black 56px, grey 57px);
background-image: -o-radial-gradient(-23px 50%, circle closest-corner, rgba(0, 0, 0, 0) 0, rgba(0, 0, 0, 0) 55px, black 56px, grey 57px);
background-image: radial-gradient(-23px 50%, circle closest-corner, rgba(0, 0, 0, 0) 0, rgba(0, 0, 0, 0) 55px, black 56px, grey 57px);
}
为了让 z-indexing 工作(this seems to ignore the negative z-index)付出了比我预期更多的努力,然而,this gives a nice clean look (在 IE9、FF、Chrome 中测试):
HTML
<div id="a" class="inversePair">A</div>
<div id="b" class="inversePair">B</div>
CSS
.inversePair {
border: 1px solid black;
background: grey;
display: inline-block;
position: relative;
height: 100px;
text-align: center;
line-height: 100px;
vertical-align: middle;
}
#a {
width: 100px;
border-radius: 50px;
}
#a:before {
content:' ';
left: -6px;
top: -6px;
position: absolute;
z-index: -1;
width: 112px; /* 5px gap */
height: 112px;
border-radius: 56px;
background-color: white;
}
#b {
width: 200px;
z-index: -2;
padding-left: 50px;
margin-left: -55px;
overflow: hidden;
-webkit-border-top-right-radius: 20px;
-webkit-border-bottom-right-radius: 20px;
-moz-border-radius-topright: 20px;
-moz-border-radius-bottomright: 20px;
border-top-right-radius: 20px;
border-bottom-right-radius: 20px;
}
#b:before {
content:' ';
left: -58px;
top: -7px;
position: absolute;
width: 114px; /* 5px gap, 1px border */
height: 114px;
border-radius: 57px;
background-color: black;
}
关于CSS 3 形状 : "Inverse Circle" or "Cut Out Circle",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10501488/
所以我在 python 中有这段代码,目前它只返回切割杆的最大值。我怎样才能修改它以让我也知道切割的位置?它采用一个价格列表,其指数 +1 对应于每个长度的杆的值(value),n 对应于杆的长度。
我正在从 bash 中的 NFS 位置获取服务器和路径,如下所示: #!/bin/bash ST="/net/10.111.111.111/path/to/some/dir" echo $ST SER
我已经创建了一个脚本来枚举目录及其下的所有文件。我想通过使用 pv 添加一些进度反馈,因为我通常从根目录使用它。 问题是 find 在它的时间输出 (%TT) 中总是包含小数秒,但我不想记录那么多细节
我不是java编码员,但需要一个可以执行的命令 cut -d "/" -f1,2,3 MyFile 有什么想法吗? 最佳答案 读取文件。在 / 上拆分每一行,然后打印出前三部分。 BufferedRe
有谁知道R如何在cut函数中选择有效位数? y y breaks1 table(cut(y, breaks = breaks1, dig.lab = min(nchar(breaks1)))) #
我创建了 pycharm Ubuntu中的命令,但我有一个小问题。当我执行命令时,pycharm 打开,但它仍然与终端相关。我的意思是如果我关闭终端,pycharm 最终也会关闭。有没有一种简单的方法
Unix cut command 需要一个字段列表,但不是我需要的顺序。 $ echo 1,2,3,4,5,6 | cut -d, -f 1,2,3,5 1,2,3,5 $ echo 1,2,3,4,
我正在尝试使用 Unix cut删除每行的前两个字段。我有表单的输入行 ( token )(空格)( token )(大量文本) 问题是有退出n每行 token ,所以我不能做这样的事情 cut -f
我正在用 Python 实现一个 PEG 解析器生成器,到目前为止我已经取得了成功,除了“cut”功能,任何了解 Prolog 的人都必须知道。 这个想法是,在解析了剪切 ( ! ) 符号后,不应在同
我目前正在为剪切而苦苦挣扎......我不知道是否还有其他功能。 我有一个包含值的大表和一个包含阈值的矩阵或向量。 假设我有一个包含阈值 0.6、0.8、1.0、1.2、1.4 的矩阵我想找出一个值(
我想使用 cut() 中定义的中断来剪切我的数据: x = c(-10:10) cut(x, c(-2,4,6,7)) [1] (-2,4] (-
我正在使用 cut()以 0.05 的增量对从负值到正值的列表进行分类。但是,在 -0.05 到 0.05 范围内对零的处理会根据 cut 函数中使用的范围(参见下面的示例)而变化,因此我得到 [-0
我正在探索 cut 函数的使用,并尝试将以下基本向量切割成 10 个断点。我可以做到,但我很困惑为什么我的初始中断发生在 -0.1 而不是 0: test_vec <- 0:10 test_vec2
我有一个大的制表符分隔文件(10TB)。 我想按某些列削减文件,我想使用我的24个内核中的每一个并行执行此操作。 cut -f1,2,3 file > out 关于如何使用多个内核或并行执行此操作的任
已关闭。这个问题是 off-topic 。目前不接受答案。 想要改进这个问题吗? Update the question所以它是on-topic用于堆栈溢出。 已关闭10 年前。 Improve th
我已经阅读了有关此主题的许多主题,但我在那里找到的代码似乎不起作用。我正在尝试禁用 Excel 电子表格中的“剪切”功能,并且我希望该图标变灰。 我一直在使用这段代码: Sub WorkSheet_A
我正在尝试使用“剪切”命令分析风力数据, 我要设置16个风向 我如何将方向 348.75 至 11.25 切割为“0”标签?谢谢 埃利亚夫 最佳答案 这可能不是一个通用的临时解决方案,但您可以通过将
我是编程新手(正在上课),我不确定如何完成这项任务。 “忽略大小写,找到输入中最后一次出现的‘a’,并删除其后面的所有字符。如果单词中没有‘a’,则删除除前两个字符之外的所有字符(提醒:不要使用if语
我有这样的文字: word1 word2 word3 word4 一对单词之间可能有多个空格,我想从每一行中获取一些单词列。当我使用 cat 文件时 | cut -d ' ' -f1,2,4 似
编辑:添加 defT 使用 pandas.cut 是否会改变 pandas.DataFrame 的结构。 我按以下方式使用 pandas.cut 将单个年龄年份映射到年龄组,然后进行聚合。但是,聚合不
我是一名优秀的程序员,十分优秀!