小编Chr*_*ard的帖子

水平列表项

所以,我试图创建一个水平列表,用于我正在设计的新网站.我已经尝试过在网上找到的一些建议,例如将'float'设置为左边等等 - 但是在修复问题时这些都没有用.

    ul#menuItems {
      background: none;
      height: 50px;
      width: 100px;
      margin: 0;
      padding: 0;
    }
    ul#menuItems li {
      display: inline;
      list-style: none;
      margin-left: auto;
      margin-right: auto;
      top: 0px;
      height: 50px;
    }
    ul#menuItems li a {
      font-family: Arial, Helvetica, sans-serif;
      text-decoration: none;
      font-weight: bolder;
      color: #000;
      height: 50px;
      width: auto;
      display: block;
      text-align: center;
      line-height: 50px;
    }
Run Code Online (Sandbox Code Playgroud)
<ul id="menuItems">
  <li>
    <a href="index.php">Home</a>
  </li>
  <li>
    <a href="index.php">DJ Profiles</a>
  </li>
</ul>
Run Code Online (Sandbox Code Playgroud)

目前我不确定是什么导致了这个问题,我将如何解决它?

html css

48
推荐指数
4
解决办法
12万
查看次数

Xamarin iOS导航到设置

我一直在尝试找到一种导航方式,从应用程序导航到应用程序的"设置"首选项.

我尝试了以下,但不幸的是它确实是错误的.

      var root = new UINavigationController ();
      root.PushViewController (new Uri ("prefs:root=General"), true);
Run Code Online (Sandbox Code Playgroud)

在尝试这个时,我确实认为它会出错,因为它应该用于导航到已经制作的视图.

无论如何我可以通过使用Xamarin C#导航到设置应用程序吗?

谢谢.

c# xamarin.ios ios xamarin

3
推荐指数
1
解决办法
2698
查看次数

CAShapeLayer 未在动画中更新

我有一个包含基本形状的 CAShapeLayer,它是在“drawRect”方法期间创建的,如下所示。

override func drawRect(frame: CGRect)
    {
        let rectangleRect = CGRectMake(frame.minX + 2.5, frame.minY + 2.5, frame.width - 5, frame.height - 5)
        let rectanglePath = UIBezierPath(roundedRect: rectangleRect, cornerRadius: 4)
        shapeLayer.path = rectanglePath.CGPath

        if (self.active == true)
        {
            shapeLayer.fillColor = selectedColor.CGColor
        } else
        {
            shapeLayer.fillColor = buttonColor.CGColor
        }

        shapeLayer.strokeColor = buttonOutlineColor.CGColor
        shapeLayer.lineWidth = 5.0

        self.layer.addSublayer(shapeLayer)

    }
Run Code Online (Sandbox Code Playgroud)

我用它来创建一个带有笔划的简单正方形。然后我有另一种方法,它有一个动画CAShapeLayer。但是,当调用该方法时,.NET 上没有任何更改CAShapeLayer。动画方法如下所示。

let animation = CABasicAnimation(keyPath: "strokeColor")
    animation.duration = 0.5
    animation.repeatCount = 10
    animation.fromValue = UIColor.whiteColor()
    animation.toValue = UIColor.redColor()
    animation.autoreverses = …
Run Code Online (Sandbox Code Playgroud)

core-animation ios swift

2
推荐指数
1
解决办法
318
查看次数

标签 统计

ios ×2

c# ×1

core-animation ×1

css ×1

html ×1

swift ×1

xamarin ×1

xamarin.ios ×1