首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >为什么我有这些白色边框的铬和一些分辨率,以及如何删除他们?

问为什么我有这些白色边框的铬和一些分辨率,以及如何删除他们?
EN

Stack Overflow用户
提问于 2016-05-26 16:48:40
回答 1查看 411关注 0票数 6

我正在使用CSS旋转来获得CSS中的万花筒效果。

一切看起来都很好,除了Chrome的分辨率(在IE10上没有问题,我没有测试FF)

我不知道为什么,但有时我会在万花筒的中心出现一些奇怪的白色边框,即使旋转值看起来一切正常。我找不到任何解决办法...

​

​

你可以在这里测试一个有效的演示:http://jsfiddle.net/Lvc0u55v/4519/

您可能需要将滑块从jsfiddle移开才能看到显示的白色边框。

我使用这种css:transform: rotate(151deg) matrix(-1, 0, 0, 1, 0, 0)作为背景图片。

你能帮我去掉这些边框吗?

EN

回答 1

Stack Overflow用户

发布于 2016-05-26 17:26:02

希望这能有所帮助。

代码语言:javascript
复制
var myApp = angular.module('myApp', []);
myApp.controller('mainCtrl', ['$scope', '$timeout',
function($scope, $timeout) {
    $scope.bgImage = 'url(http://www.larousse.fr/encyclopedie/data/images/1310226-Vincent_Van_Gogh_la_Nuit_%C3%A9toil%C3%A9e.jpg)';
    var section = 12;
    $scope.getNumber = function() {
        return new Array(section);
    }
    $scope.getRotation = function(i) {
        var hasMatrix = false, deg = 0, base = 360 / section, rotation;
        if (i % 2 === 0) {
            i -= 1;
            hasMatrix = true;
        }
        deg = Math.round(i * base + 1);
        if (section <= 4) {
            deg -= 1;
        }
        rotation = 'rotate(' + deg + 'deg)';
        if (hasMatrix) {
            // Please updated this line
            rotation += ' matrix(-1, 0, 0, 1, -1, 0)';
        }
        return rotation;
    }
    $scope.mode = 'move';
    $scope.onMousemove = function(e) {
    console.log($scope.mode);
    if ($scope.mode === 'move') {
        $scope.bgPosition = e.pageX + 'px ' + e.pageY + 'px';
    }
    };
}]);
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/37455917

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档