0

I am using the following with AngularJS:

<div style="width: 725px; height: 200px;" 
 data-ng-bind-html-unsafe="question.text"></div>

Is there a way that I can add a scroll to this so that it will accept any size of contents:

4

2 回答 2

2

Your container (div) already has a fixed height, so use the css property overflow-y: scroll. Note that it is not supported in IE < 8.

于 2013-08-13T10:32:13.377 回答
1

Use overflow-y and a fixed height. This will add scrolling to the div.

For instance

<div style="width: 725px; height: 200px; overflow-y:scroll;" data-ng-bind-html-unsafe="question.text">
</div>

Hope this helps.

于 2013-08-13T10:27:57.367 回答