国产av日韩一区二区三区精品,成人性爱视频在线观看,国产,欧美,日韩,一区,www.成色av久久成人,2222eeee成人天堂

css - angular前端如何讓ng-repeat的內(nèi)容並排一行,跑起來呢?
給我你的懷抱
給我你的懷抱 2017-05-15 17:04:09
0
4
761

html代碼:

<body ng-controller="mainCtrl">
        
        <table cellpadding="2" border="1" cellspacing="0">
            
            <thead>
                <th>Name</th>
                <th>Age</th>
                <th>node show</th>
            </thead>
            
            <tbody>
                <tr ng-repeat="d in datas">
                    
                    <td>{{d.name}}</td>
                    <td>{{d.age}}</td>
                    <td style="width: 500px;"><node-marquee></node-marquee></td>
                </tr>
            </tbody>
            
        </table>
    </body>

js:

app.controller("mainCtrl",['$scope',function($scope){
    
    $scope.datas=[{"name":"tom","age":22},{"name":"mary","age":36},{"name":"john","age":63}];
    
    
    
}]);

js指令:

app.directive('nodeMarquee', function($interval) {
    return {
        restrict : 'E',
        scope:{
            
        },    
        replace:true,
        templateUrl: 'marquee.html',
        link : function(scope, element, attrs){    
            
            
    };
});

marquee.html

<marquee bgcolor="azure" behavior="scroll" onmouseover="this.stop()" onmouseout="this.start()"  style="font-size:30px;font-weight: bolder;" >

<p ng-repeat="i in [4,5,6]">
    
    {{i}}
    
</p>


</marquee>

現(xiàn)在的效果是這樣的:不是一行的。如何讓其變成一行,這樣顯示:4<5<6,並且當(dāng)滑鼠移動(dòng)到4上,停止?jié)L動(dòng),並且彈出一個(gè)提示框顯示4,當(dāng) 滑鼠離開,就繼續(xù)跑馬燈顯示。 5和6也是一樣

不是很懂前端啊,求幫忙! !

給我你的懷抱
給我你的懷抱

全部回覆(4)
PHPzhong

使用span

過去多啦不再A夢

前端都沒看懂你要問什麼

Ty80

<p ng-repeat="i in [4,5,6]">{{i}}</p> 這段,ng-repeat是重復(fù)當(dāng)前的元素,運(yùn)行后是<p>4</p><p>5</p><p>6</p>,所以他們不在同一行。你換成span試試,<span ng-repeat="i in [4,5,6]">{{i}}</span>。

洪濤

找美工調(diào)樣式唄

最新下載
更多>
網(wǎng)站特效
網(wǎng)站源碼
網(wǎng)站素材
前端模板