亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

:after,:before的絕對定位問題

:after,:before的絕對定位問題

m慕光 2016-11-08 22:54:06
<!DOCTYPE html><html><head>? ? <meta charset="UTF-8">? ? <title>Document</title>? ? <style>? ? .reply {? ? ? ? position: relative;? ? ? ? width: 200px;? ? ? ? height: 80px;? ? ? ? border: 1px solid rgba(243, 237, 127, 0.68);? ? ? ? border-radius: 5px;? ? ? ? background-color: rgba(243, 237, 127, 0.35);? ? }? ??? ? .reply:after {? ? ? ? content: '';? ? ? ? width: 0px;? ? ? ? height: 0px;? ? ? ? border-color: transparent transparent rgba(243, 237, 127, 0.35) transparent;? ? ? ? border-style: solid;? ? ? ? border-width: 6px;? ? ? ? position: absolute;? ? ? ? top: -11px;? ? ? ? border-radius: 3px;? ? ? ? left: 18px;? ? ? ? right: auto;? ? }? ??? ? .reply:before {? ? ? ? content: '';? ? ? ? width: 0px;? ? ? ? height: 0px;? ? ? ? border-color: transparent transparent rgba(243, 237, 127, 0.68) transparent;? ? ? ? border-style: solid;? ? ? ? border-width: 7px;? ? ? ? position: absolute;? ? ? ? top: -14px;? ? ? ? border-radius: 3px;? ? ? ? left: 17px;? ? ? ? right: auto;? ? }? ? </style></head><body>? ? <div class="reply"></div></body></html>實現簡單的聊天氣泡(如下圖),我的問題是兩個偽類中top和left的值應該如何設置呢?
查看完整描述

3 回答

?
李曉健

TA貢獻1036條經驗 獲得超461個贊

你的效果不是正常的嘛,有什么問題?

查看完整回答
反對 回復 2016-11-09
  • 3 回答
  • 1 關注
  • 2948 瀏覽
慕課專欄
更多

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號