CSS实现带箭头方框怎么控制箭头位置!

<html><head><title>纯CSS无图片带箭头的DIV方框</title><style>div.container{position:absolute;top... <html>

<head>
<title>纯CSS无图片带箭头的DIV方框</title>
<style>
div.container{position:absolute;
top:30px;
left:40px;
font-size: 9pt;
display:block;
height:100px;
width:200px;
background-color:transparent;
*border:1px solid #666;
}
s{
position:absolute;
top:-20px;
*top:-22px;
left:20px;
display:block;
height:0;
width:0;
font-size: 0;
line-height: 0;
border-color:transparent transparent #666 transparent;
border-style:dashed dashed solid dashed;
border-width:10px;
}
i{
position:absolute;
top:-9px;
*top:-9px;
left:-10px;
display:block;
height:0;
width:0;
font-size: 0;
line-height: 0;
border-color:transparent transparent #fff transparent;
border-style:dashed dashed solid dashed;
border-width:10px;
}
.content{
border:1px solid #666;
-moz-border-radius:3px;
-webkit-border-radius:3px;
position:absolute;
background-color:#fff;
width:100%;
height:100%;
padding:5px;
*top:-2px;
*border-top:1px solid #666;
*border-top:1px solid #666;
*border-left:none;
*border-right:none;
*height:102px;
box-shadow: 3px 3px 4px #999;
-moz-box-shadow: 3px 3px 4px #999;
-webkit-box-shadow: 3px 3px 4px #999;
/* For IE 5.5 - 7 */
filter: progid:DXImageTransform.Microsoft.Shadow(Strength=4, Direction=135, Color='#999999');
/* For IE 8 */
-ms-filter: "progid:DXImageTransform.Microsoft.Shadow(Strength=4, Direction=135, Color='#999999')";
}
</style>
</head>
<body>
<div class="container">
<div class="content"><br>这是框中的文字,可动态显示。高度自动增加,应该不错吧^_^</div>
<s>
<i></i>
</s>
</div>
<br />
</body>
</html>
现在箭头在上方向上紧贴上边框,我想让箭头方向指向左边紧贴左边框怎么弄啊!请教!!!
展开
 我来答
a3476012
推荐于2016-08-01 · TA获得超过1268个赞
知道小有建树答主
回答量:484
采纳率:87%
帮助的人:129万
展开全部
你可以做一个带箭头的div;然后样式如下:
div
{
/* 箭头的样式,你自己设计,下面是旋转的样式*/
transform:rotate(90deg);
-ms-transform:rotate(90deg); /* Internet Explorer */
-moz-transform:rotate(90deg); /* Firefox */
-webkit-transform:rotate(90deg); /* Safari 和 Chrome */
-o-transform:rotate(90deg); /* Opera */
}
这个是CSS3,所以浏览器并不是都兼容的。上面的deg就是角度单位度。
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
809807519
2011-05-18 · 超过25用户采纳过TA的回答
知道答主
回答量:84
采纳率:0%
帮助的人:73.6万
展开全部
改箭头图片的方向,重新对图片定位,思路就这样
本回答被提问者采纳
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
子安来了
2012-11-06
知道答主
回答量:8
采纳率:0%
帮助的人:3.7万
展开全部
改变left的值
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
收起 更多回答(1)
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式