【发布时间】:2018-06-25 15:15:49
【问题描述】:
我正在尝试更改 botframework 的网络聊天外观。 展示自适应卡片时,它们超出了 div:
我希望带有“ac-pushButton”类的按钮元素中的文本内容跳过一行。不超过 div。
以下是自适应卡片的html和css代码:
div {
display: block;
}
.wc-message-from-bot {
float: left;
margin-left: 8px; }
.wc-message-from-bot .wc-message-content {
background-color: #eceff1;
color: #000000; }
.wc-message-from-bot .wc-message-content {
background-color: #eceff1;
color: #000000;
}
/* list */
.wc-list > .wc-card {
margin-top: 8px; }
.wc-list > .wc-card:first-child {
margin-top: 0; }
/* alternate chat sizes */
.wc-message {
max-width: 91%; }
.wc-card {
border: 1px solid #d2dde5;
width: 302px; }
.wc-adaptive-card {
width: 318px; }
.wc-wide .wc-card {
border: 1px solid #d2dde5;
width: 398px; }
.wc-wide .wc-adaptive-card {
width: 414px; }
.wc-narrow .wc-card {
border: 1px solid #d2dde5;
width: 198px; }
.wc-narrow .wc-adaptive-card {
width: 214px; }
/* adaptive card adjustments from wc-card */
.wc-adaptive-card p {
margin-left: 0;
margin-right: 0; }
.wc-message-content {
border-radius: 2px;
box-shadow: 0px 1px 1px 0px rgba(0, 0, 0, 0.2);
padding: 8px;
word-break: break-word;
}
<div class="wc-list">
<div class="wc-card wc-adaptive-card hero">
<div class="ac-container" style="background-color: rgba(0, 0, 0, 0); padding: 8px; box-sizing: border-box;">
<div class="ac-container" style="background-color: rgba(0, 0, 0, 0); padding: 0px; box-sizing: border-box;"></div>
<div style="height: 8px;"></div>
<div>
<div style="overflow: hidden;">
<div style="display: flex; flex-direction: column; align-items: flex-start;"><button type="button" class="ac-pushButton" style="overflow: hidden; white-space: nowrap; text-overflow: ellipsis; flex: 0 1 auto;">O que encontro na p&#225;gina Meu Perfil?</button>
<div style="height: 8px;"></div>
<button type="button" class="ac-pushButton" style="overflow: hidden; white-space: nowrap; text-overflow: ellipsis; flex: 0 1 auto;">O que &#233; o Minha Carteira na p&#225;gina Meu Perfil?</button>
<div style="height: 8px;"></div><button type="button" class="ac-pushButton" style="overflow: hidden; white-space: nowrap; text-overflow: ellipsis; flex: 0 1 auto;">O que &#233; Meu Endere&#231;o na p&#225;gina Meu Perfil?</button>
<div style="height: 8px;"></div><button type="button" class="ac-pushButton" style="overflow: hidden; white-space: nowrap; text-overflow: ellipsis; flex: 0 1 auto;">None of the above.</button></div>
</div>
<div style="background-color: rgba(0, 0, 0, 0);"></div>
</div>
</div>
</div>
</div>
我设法做的是这样:
Sub:将宽度从 wc-adaptive-card 类更改为自动。
但我希望他提供全文。
注意:我是初学者。
【问题讨论】:
-
将按钮样式更改为:溢出:可见;文本溢出:初始;
标签: javascript html css botframework