android剪辑路径问题上的Nativescript样式

android剪辑路径问题上的Nativescript样式,android,ios,css,clip-path,angular2-nativescript,Android,Ios,Css,Clip Path,Angular2 Nativescript,我正在尝试使用找到的Nativescript样式剪辑路径。我的代码 #container { background-color:black; width:400; height: 250; background-image:url("~/testImages/test1.jpg"); background-repeat: no-repeat; background-size: cover; -webkit-clip-path: inset(50pt 1

我正在尝试使用找到的Nativescript样式剪辑路径。我的代码

#container {
   background-color:black;
   width:400;
   height: 250;
   background-image:url("~/testImages/test1.jpg");
   background-repeat: no-repeat;
   background-size: cover; 
   -webkit-clip-path: inset(50pt 150pt 150pt 10pt);
   clip-path: inset(50pt 150pt 150pt 10pt);

   /* 
        inset(top right bottom left round top-radius right-radius bottom-radius left-radius)
   */
}
我的看法

<AbsoluteLayout id="container" ></AbsoluteLayout>

mypackage.json文件

{
  "name": "NativeAppTest",
  "version": "1.0.0",
  "description": "native app test",
  "nativescript": {
    "id": "com.test.native",
    "tns-ios": {
      "version": "2.1.1"
    },
    "tns-android": {
      "version": "2.2.0"
    }
  },
  "dependencies": {
    "@angular/common": "2.0.0-rc.3",
    "@angular/compiler": "2.0.0-rc.3",
    "@angular/core": "2.0.0-rc.3",
    "@angular/http": "2.0.0-rc.3",
    "@angular/platform-browser": "2.0.0-rc.3",
    "@angular/platform-browser-dynamic": "2.0.0-rc.3",
    "@angular/platform-server": "2.0.0-rc.3",
    "@angular/router": "3.0.0-alpha.7",
    "email-validator": "1.0.4",
    "font-awesome": "^4.6.3",
    "nativescript-angular": "^0.3.0",
    "nativescript-social-share": "1.2.0",
    "nativescript-unit-test-runner": "^0.3.3",
    "tns-core-modules": "^2.2.0"
  },
  "devDependencies": {
    "babel-traverse": "6.8.0",
    "babel-types": "6.8.1",
    "babylon": "6.8.0",
    "filewalker": "0.1.2",
    "jasmine-core": "^2.4.1",
    "karma": "^0.13.22",
    "karma-jasmine": "^1.0.2",
    "karma-nativescript-launcher": "^0.4.0",
    "lazy": "1.0.11",
    "nativescript-dev-typescript": "^0.3.2",
    "typescript": "^1.8.10"
  }
}
我还没有试过iOS。 这可能也不是最好的办法。我正在试着做一个收割机。在视图中,用户将看到他们将定位的剪辑路径下的图像。我并不是在裁剪图像。如有任何建议,我们将不胜感激。谢谢

更新

在我上面链接的“支持的CSS属性”下,它说

设置剪辑路径。支持的形状有圆形、椭圆形、矩形和多边形。您可以使用clippy定义自己的形状


我想这是一个不同的问题,但如何使用clippy为clip path:inset设置CSS属性?我自己也会这么做,但我不知道怎么做。

这是可行的剪辑路径:圆形(50%在50%在50%);这不剪辑路径:插入(10%10%10%10%);这也适用于剪辑路径:多边形(5%5%,96%5%,96%100%,5%100%);所以剪辑路径:插图必须不受支持,否则我使用不正确;这不剪辑路径:插入(10%10%10%10%);这也适用于剪辑路径:多边形(5%5%,96%5%,96%100%,5%100%);所以剪辑路径:插图必须不受支持,否则我使用不正确。
-webkit-clip-path: inset(50% 150% 150% 10%);
clip-path: inset(50% 150% 150% 10%); 
-webkit-clip-path: inset(50px 150px 150px 10px);
clip-path: inset(50px 150px 150px 10px); 
{
  "name": "NativeAppTest",
  "version": "1.0.0",
  "description": "native app test",
  "nativescript": {
    "id": "com.test.native",
    "tns-ios": {
      "version": "2.1.1"
    },
    "tns-android": {
      "version": "2.2.0"
    }
  },
  "dependencies": {
    "@angular/common": "2.0.0-rc.3",
    "@angular/compiler": "2.0.0-rc.3",
    "@angular/core": "2.0.0-rc.3",
    "@angular/http": "2.0.0-rc.3",
    "@angular/platform-browser": "2.0.0-rc.3",
    "@angular/platform-browser-dynamic": "2.0.0-rc.3",
    "@angular/platform-server": "2.0.0-rc.3",
    "@angular/router": "3.0.0-alpha.7",
    "email-validator": "1.0.4",
    "font-awesome": "^4.6.3",
    "nativescript-angular": "^0.3.0",
    "nativescript-social-share": "1.2.0",
    "nativescript-unit-test-runner": "^0.3.3",
    "tns-core-modules": "^2.2.0"
  },
  "devDependencies": {
    "babel-traverse": "6.8.0",
    "babel-types": "6.8.1",
    "babylon": "6.8.0",
    "filewalker": "0.1.2",
    "jasmine-core": "^2.4.1",
    "karma": "^0.13.22",
    "karma-jasmine": "^1.0.2",
    "karma-nativescript-launcher": "^0.4.0",
    "lazy": "1.0.11",
    "nativescript-dev-typescript": "^0.3.2",
    "typescript": "^1.8.10"
  }
}