角下拉(可能只是IE):在IE浏览器下拉怪定位 [英] Angular Dropdown (could be just IE): strange positioning of dropdown in IE
问题描述
我要带婴儿学步带角和跨浏览器编写简单的东西和测试,我有一个简单的脚本绑定对一个JSON字符串数组的菜单。我想这样做,而不是使用Javascript DOM操作全角MVC。
I'm taking baby steps with Angular and writing simple stuff and testing across browsers, I have a simple script to bind a menu against a JSON string array. I want to do the whole Angular MVC instead of Javascript DOM manipulation.
在我的测试中我可以看到一个奇怪的行为,以取决于该项目被选中在IE菜单顶部的定位。任何人都知道如何解决这个问题?我想用一个角友好的解决方案,如引导?
In my tests I can see a strange behaviour as to the positioning of the top of the menu in IE dependent upon which item is selected. Anyone know how to fix this? I would like to use an Angular friendly solution, like Bootstrap?
菜单看起来Firefox和Chrome不错。
Menu looks good in Firefox and Chrome.
<html ng-app="myNoteApp">
<script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.3.14/angular.min.js"></script>
<body>
<div ng-controller="myCarSelector">
<h2>Menu</h2>
<p>Make of car : <span ng-bind="selectedCarMake"></span></p>
<select ng-model="selectedCarMake" ng-options="val for val in carmakes"></select>
</div>
<script>
// was in separate file but pasted in for demo purposes
var app = angular.module("myNoteApp", []);
</script>
<script>
// was in separate file but pasted in for demo purposes
app.controller("myCarSelector", function ($scope) {
$scope.selectedCarMake = "BMW"; // default value
$scope.carmakes = ["Audi", "BMW", "Volkswagen"];
});
</script>
</body>
</html>
我喜欢接受的答案,然后移动到下一个问题。
I like to accept answers and then move on to next question.
这是问题的在IE 11的屏幕抓取
Here is a screen grab of the problem in IE 11
推荐答案
看来浏览器的默认行为。
It seems browser default behaviour.
这篇关于角下拉(可能只是IE):在IE浏览器下拉怪定位的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!