-
-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[css] 第330天 使用css实现对话气泡的效果 #2039
Labels
css
css
Comments
一个带圆角的长方形/椭圆 加上before伪类贴在左边或者右边的小三角形三角形 |
方法:使用圆角矩形作为对话的主体框,左侧或右侧增加附加三角形,三角形使用border样式设置来实现,相对定位和绝对定位结合使三角形附于圆角矩形左侧或右侧;
|
p.speech{
position: relative;
width: 50px;
border:1px solid #666;
padding: 2px;
border-radius: 4px;
}
p.speech::before{
position: absolute;
content: "";
top:9px;
left:-12px;
width: 0;
border:6px solid;
border-color:transparent #666 transparent transparent;
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
第330天 使用css实现对话气泡的效果
我也要出题
The text was updated successfully, but these errors were encountered: