css实现小圆点

html-css030

css实现小圆点,第1张

<!DOCTYPE html>

<html>

<head>

<meta charset="utf-8" />

<title></title>

<style type="text/css">

.redcircle {undefined

position: absolute

margin: 52px 45px

width: 12px

height: 12px

background: #FF0000

border-radius: 50%

border: 1px solid #FF6347

}

.greencircle {undefined

position: absolute

margin: 52px 45px

width: 12px

height: 12px

background: #228B22

border-radius: 50%

border: 1px solid #3CB371

}

</html>

其实我就想实现未点击按钮时,文字右上方有小圆点,点击后消失的效果

但是不想用浮动、定位,结果百度搜了一圈,大家都是用浮动、定位解决,

记录两种更好的解决方案:

1.使用sup标签

2.使用css属性vertical-align

1.打这些字符出来直接写到网页标题中,比如:·

2.li自带圆点(如果你没去掉的话)

3.图片做个圆点或其他玩意,定义成背景图

如果你指的是<title></title>这个标题里面的文字,那css控制不了,只能打符号字进去:

<title>●你的标题</title>

<title>·你的标题</title>

大多数拼音输入法先:按v再按1,都能打出这些字符