1

嗨,所有开发人员和网页设计师,我想用 twitter bootstrap 创建一个侧面的圆形效果,就像这张图片一样。左侧有一条圆形曲线,右侧有矩形直线,但是矩形对其左侧有影响,您可以在图片中看到,我怎样才能创建这样的东西?谢谢。

4

3 回答 3

0

看看这个演示

CSS

body {
    background-color: #555;
}
#outer {
    margin: 100px auto;
    background-color: black;
    border-radius: 10px;
    width: 600px;
    height: 200px;
    text-align: center;
    color: white;
    font-size: 25px;
    line-height: 200px;
}

#inner {
    width: 200px; height: 200px;
    position: relative;
    background: url(http://i.imgur.com/fqct5Us.gif) center;
    border-radius: 1000px;
    overflow: hidden;
    border: 10px solid black;
    float: left;
    -webkit-transform: scale(1.4);
       -moz-transform: scale(1.4);
        -ms-transform: scale(1.4);
         -o-transform: scale(1.4);
            transform: scale(1.4);
}

#inner:before {
    content: '';
    position: absolute;
    height: 200px; width: 50px;
    left: 30px; bottom: -110px;
    display: inline-block;
    background-color: black;
    -webkit-transform: rotate(-45deg);
       -moz-transform: rotate(-45deg);
        -ms-transform: rotate(-45deg);
         -o-transform: rotate(-45deg);
            transform: rotate(-45deg);
}

HTML

<div id="outer">
        I am lorem. &larr; Huh?
    <div id="inner">
    </div>
</div>
于 2013-09-20T08:47:31.690 回答
0

试试这个圆形图像。

HTML:

<div class="circular"></div>

CSS:

.circular {
  width: 300px;
  height: 300px;
  border-radius: 150px;
  -webkit-border-radius: 150px;
  -moz-border-radius: 150px;
  background: url(http://link-to-your/image.jpg) no-repeat;
}

或者

HTML:

<div class="circular"><img src="http://link-to-your/image.jpg" alt="" /></div>

CSS:

.circular {
    width: 300px;
    height: 300px;
    border-radius: 150px;
    -webkit-border-radius: 150px;
    -moz-border-radius: 150px;
    background: url(http://link-to-your/image.jpg) no-repeat;
}

.circular img {
    opacity: 0;
    filter: alpha(opacity=0);
}

演示

于 2013-09-20T08:33:15.733 回答
0

像这样

演示

css

.circle {
  width: 300px;
  height: 300px;
  border-radius: 150px;
  -webkit-border-radius: 150px;
  -moz-border-radius: 150px;
  background-color:blue;
}

像这样更多链接

于 2013-09-20T08:34:34.413 回答