小编ini*_*tar的帖子

CSS:鼠标悬停更改图像位置和大小

我正在尝试为我的网站做一个按钮菜单,我对鼠标悬停时图像的位置有疑问.这是我到目前为止创建的http://jsfiddle.net/tNLUx/

在鼠标悬停时,我希望所选图像增长,而其他图像保持相同的位置,就像第一张图像一样......如何使向下图像增长并向下移动而不是向上移动?

这是我的一些CSS

#btnSocial {
  width:100px;
  position: relative;
  opacity: 0.5;
  -webkit-opacity: 0.5;
  -moz-opacity: 0.5;
  transition: 0.5s ease;
  -webkit-transition: 0.5s ease;
  -moz-transition: 0.5s ease;
}
#btnSocial:hover{
  width: 150px;
  opacity: 1;
  -webkit-opacity: 1;
  -moz-opacity: 1;
}
Run Code Online (Sandbox Code Playgroud)

谢谢你的时间

干杯

html css hover

14
推荐指数
1
解决办法
7万
查看次数

C# - 通过相同的方法传递不同类型的对象

原始问题

所以我有这三个对象......

public class obj1
{
  public int Id { get; set; }
  public string Name { get; set; }
}

public class obj2
{
  public int AccNum { get; set; }
  public string Name { get; set; }
}

public class obj3
{
  public string Email { get; set; }
  public string Phone { get; set; }
}
Run Code Online (Sandbox Code Playgroud)

...和一个应该接收其中一个的方法,在评估对象类型后,程序应该决定调用哪个函数.

我尝试过泛型,但它不能像我预期的那样工作.到目前为止,这就是我所拥有的......

    public class NotificationHelper: INotificationHelper
    {

        public bool SendNotification<TNotInfo>(TNotInfo obj) where TNotInfo : class
        {
            if (contract.GetType() == typeof (obj1)) …
Run Code Online (Sandbox Code Playgroud)

.net c#

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

数组未在某些情况下填充

我很难解决这个问题,我很欣赏这个剧本.

尝试做倒计时脚本,我必须显示从前一个计数的新数字.

let oldN = 0;
let newN = 0;
let arr = [];

function runner() {
  arr = [];
  newN = document.getElementById('newVar').value;

  console.log("stored: " + oldN + " new: " + newN);

  if (oldN > newN) {
    for (let i = oldN; i >= newN; i--) {
      arr.push(i);
    }
  } else if (oldN < newN) {
    for (let e = oldN; e <= newN; e++) {
      arr.push(e);
    }
  }

  console.log("array: " + arr.length);
  oldN = newN;

  for (let u …
Run Code Online (Sandbox Code Playgroud)

javascript

0
推荐指数
1
解决办法
61
查看次数

标签 统计

.net ×1

c# ×1

css ×1

hover ×1

html ×1

javascript ×1