css怎么实现实心圆点呀?

html-css06

css怎么实现实心圆点呀?,第1张

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

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

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

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

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

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

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

1、用css画一个圆形

.disc1{

    width: 100px

    height: 100px

    border:1px solid red

    background-color: red

    margin:300px 0px 0px 300px

    border-radius:100%

    float:left

}

2、由于爱心是由两个圆和一个正方形组成的,所以还需要再来一个圆形

.disc2{

    width: 100px

    height: 100px

    border:1px solid red

    background-color: red

    margin:250px 0px 0px 0px

    border-radius:100%

    float:left

    position: relative

    right: 50px

}

3、心型下方就需要做一个正方形

.square{

    width: 100px

    height: 100px

    border:1px solid red

    background-color: red

    margin: 300px 0px 0px 0px

    float: left

    position: relative

    right: 152px

}

4、做完这些的效果已经基本上出来了,但是还需要调整一下爱心的角度,这时就需要用到css样式中的transform中的rotate属性了。

由于需要把三个div都旋转角度,所以把这三个div放在一个div里面。具体代码如下:

.main{

transform: rotate(45deg)

margin: 300px

}

全部代码如下

<!DOCTYPE html>

<html>

    <head>

        <meta charset="utf-8" />

        <title></title>

<style type="text/css">

*{

    margin: 0px

    padding: 0px

}

.main{

    transform: rotate(45deg)

    margin: 300px

}

.disc1{

    width: 100px

    height: 100px

    border:1px solid red

    background-color: red

    margin:300px 0px 0px 300px

    border-radius:100%

    float:left

}

.disc2{

    width: 100px

    height: 100px

    border:1px solid red

    background-color: red

    margin:250px 0px 0px 0px

    border-radius:100%

    float:left

    position: relative

    right: 50px

}

.square{

    width: 100px

    height: 100px

    border:1px solid red

    background-color: red

    margin: 300px 0px 0px 0px

    float: left

    position: relative

    right: 152px

}

</style>

    </head>

    <body>

        <div class="main">

            <div class="disc1"></div>

            <div class="disc2"></div>

            <div class="square"></div>

        </div>

    </body>

</html>

5、上三角

最终效果:

CSS代码如下:

复制代码

代码如下:

#triangle-up {

width: 0

height: 0

border-left: 50px solid transparent

border-right: 50px solid transparent

border-bottom: 100px solid red

}

6、下三角

最终效果:

CSS代码如下:

复制代码

代码如下:

#triangle-down {

width: 0

height: 0

border-left: 50px solid transparent

border-right: 50px solid transparent

border-top: 100px solid red

}

7、左三角

最终效果:

CSS代码如下:

复制代码

代码如下:

#triangle-left {

width: 0

height: 0

border-top: 50px solid transparent

border-right: 100px solid red

border-bottom: 50px solid transparent

}

8、右三角

最终效果:

CSS代码如下:

复制代码

代码如下:

#triangle-right {

width: 0

height: 0

border-top: 50px solid transparent

border-left: 100px solid red

border-bottom: 50px solid transparent

}

9、左上三角

最终效果:

CSS代码如下:

复制代码

代码如下:

#triangle-topleft {

width: 0

height: 0

border-top: 100px solid red

border-right: 100px solid transparent

}

10、右上三角

最终效果:

CSS代码如下:

复制代码

代码如下:

#triangle-topright {

width: 0

height: 0

border-top: 100px solid red

border-left: 100px solid transparent

}

11、左下三角

最终效果:

CSS代码如下:

复制代码

代码如下:

#triangle-bottomleft {

width: 0

height: 0

border-bottom: 100px solid red

border-right: 100px solid transparent

}

12、右下三角

最终效果:

CSS代码如下:

复制代码

代码如下:

#triangle-bottomright {

width: 0

height: 0

border-bottom: 100px solid red

border-left: 100px solid transparent

}

13、平行四边形