在文本周围放置一个长方形边界 [英] Putting a Rectangular Border Around Text

查看:163
本文介绍了在文本周围放置一个长方形边界的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

对于下面的类,我试图在文本周围放一个矩形边框,但CSS不是我所期望的。

For the class below, I am trying to put a rectangular border around the text, but the CSS is not doing what I expect. How do I put a border around the text?

提前感谢,

John

CSS:

.commentnotify { 
            position:absolute;
            width:310px;
            left:30px;
            top:240px;
            color: #004993;
            border: medium;
            border-color: #004993;
            font-family:Arial, Helvetica, sans-serif;
            font-size: 10px;
            font-weight: bold;
            height: 15px;
            padding-bottom: 0px;
            padding-left: 2px;

}


推荐答案

将所有边框属性合并为一个:

you can combine all border attributes in single one:

border:1px solid #004993;

这篇关于在文本周围放置一个长方形边界的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆