.source-document-annotator-wrapper {
position:absolute;
/* display:table-row; */
}
.source-document-annotator-wrapper > .document-annotator{
/* position: relative; */
z-index: 2;
top: -120px;
/* width: 800px; */
}

<table>
<tbody>
<tr>
<td></td>
<td></td>
<td>Unmapped</td>
<td>
<a href="" ng-init="showAnnotator = false" ng-click="vm.showAnnotatorFor(this, level2ServiceMapping.leaves[0].rpfpdocid, level2ServiceMapping.leaves, 'requirement')"><img src="images/carbon-theme-ui/source_icon.png"></a>
<div class="source-document-annotator-wrapper right ng-scope" ng-if="showAnnotator">
<div class="document-annotator arrow-box">
<span class="close-button" ng-click="$parent.showAnnotator = false" title="Close annotator">×</span>
<div active="active">
</div>
</div>
</div>
</div>
</td>
</tr>
</tbody>
</table>
&#13;
.source-document-annotator-wrapper
必须是一个对话框,其箭头指向相应的表格单元格源图标
虽然没有为表格单元格指定宽度,但如何使.source-document-annotator-wrapper
占据最大宽度?
答案 0 :(得分:0)
嗯,不确定你想要的最终结果。但我得到了3个不同的结果,请参阅下面的片段
.source-document-annotator-wrapper {
position: absolute;
/* display:table-row; */
width: 100%;
background:Red;
}
.source-document-annotator-wrapper > .document-annotator {
/* position: relative; */
z-index: 2;
top: -120px;
/* width: 800px; */
}
table {
table-layout: fixed;
width: 100%;
}
tr {
width: 100%;
}
td {
position: relative;
}
&#13;
<table>
<tbody>
<tr>
<td></td>
<td></td>
<td>Unmapped</td>
<td>
<a href="" ng-init="showAnnotator = false" ng-click="vm.showAnnotatorFor(this, level2ServiceMapping.leaves[0].rpfpdocid, level2ServiceMapping.leaves, 'requirement')"><img src="images/carbon-theme-ui/source_icon.png"></a>
<div class="source-document-annotator-wrapper right ng-scope" ng-if="showAnnotator">
<div class="document-annotator arrow-box">
<span class="close-button" ng-click="$parent.showAnnotator = false" title="Close annotator">×</span>
<div active="active">
</div>
</div>
</div>
</td>
</tr>
</tbody>
</table>
&#13;
.source-document-annotator-wrapper {
position: absolute;
/* display:table-row; */
width: 100%;
background:Red;
}
.source-document-annotator-wrapper > .document-annotator {
/* position: relative; */
z-index: 2;
top: -120px;
/* width: 800px; */
}
table {
width: 100%;
}
tr {
width: 100%;
}
td {
position: relative;
}
&#13;
<table>
<tbody>
<tr>
<td></td>
<td></td>
<td>Unmapped</td>
<td>
<a href="" ng-init="showAnnotator = false" ng-click="vm.showAnnotatorFor(this, level2ServiceMapping.leaves[0].rpfpdocid, level2ServiceMapping.leaves, 'requirement')"><img src="images/carbon-theme-ui/source_icon.png"></a>
<div class="source-document-annotator-wrapper right ng-scope" ng-if="showAnnotator">
<div class="document-annotator arrow-box">
<span class="close-button" ng-click="$parent.showAnnotator = false" title="Close annotator">×</span>
<div active="active">
</div>
</div>
</div>
</td>
</tr>
</tbody>
</table>
&#13;
.source-document-annotator-wrapper {
position: absolute;
/* display:table-row; */
width: 100%;
background:Red;
}
.source-document-annotator-wrapper > .document-annotator {
/* position: relative; */
z-index: 2;
top: -120px;
/* width: 800px; */
}
tr {
width: 100%;
}
td {
position: relative;
}
&#13;
<table>
<tbody>
<tr>
<td></td>
<td></td>
<td>Unmapped</td>
<td>
<a href="" ng-init="showAnnotator = false" ng-click="vm.showAnnotatorFor(this, level2ServiceMapping.leaves[0].rpfpdocid, level2ServiceMapping.leaves, 'requirement')"><img src="https://cdn.sstatic.net/Sites/stackoverflow/img/favicon.ico"></a>
<div class="source-document-annotator-wrapper right ng-scope" ng-if="showAnnotator">
<div class="document-annotator arrow-box">
<span class="close-button" ng-click="$parent.showAnnotator = false" title="Close annotator">×</span>
<div active="active">
</div>
</div>
</div>
</td>
</tr>
</tbody>
</table>
&#13;