如何定位具有背景封面的div的正确位置按钮

时间:2015-08-25 12:25:17

标签: html css css3

我试图在正确的位置放置一个带有div的兄弟按钮,该按钮具有封面背景图像。每次当我拉伸封面div(以及#34;响应"以某种方式)时,我希望按钮位于关于此封面图像的正确位置。我的意思是封面div图像有一些图形(羽毛),我希望每次按钮都在它们之间。我怎样才能做到这一点?提前谢谢。

我的HTML

.cover_bgr {
  background: url(http://www.hdwallpapers.in/walls/colorful_background-wide.jpg) center no-repeat;
  min-width: 100%;
  background-size: cover;
  -moz-background-size: cover;
  -webkit-background-size: cover;
  -o-background-size: cover;
  position: fixed;
  top: 0;
  left: 0;
  min-height: 100%;
  height: 100%;
}

.main {
  position: relative;
  margin: 0 auto;
  z-index: 100;
  height: 500px;
  width: 100%;
}

.btn {
  position: relative;
  top: 30%;
  left: 70%;
  padding: 15x 5px;
  background-color: #2a2a2a;
  display: inline-block;
  color: #fff;
}

我的CSS

AsymmetricSecurityBindingElement securityBindingElement = new AsymmetricSecurityBindingElement();
securityBindingElement.InitiatorTokenParameters = new X509SecurityTokenParameters { InclusionMode = SecurityTokenInclusionMode.Never };
securityBindingElement.RecipientTokenParameters = new X509securityTokenParameters();
securityBindingElement.EnableUnsecuredResponse = true;
securityBindingElement.EndpointSupportingTokenParameters.Signed.Add(new X509SecurityTokenParameters());

CustomBinding binding = new CustomBinding(securityBindingElement, new TextMessageEncodingBindingElement(MessageVersion.Soap11, Encoding.UTF8), new HttpsTransportBindingElement());

EndpointAddress endpoint = new EndpointAddress(new Uri(URL));

ChannelFactory<type> channelFactory = new ChannelFactory<type>(binding, endpoint);
channelFactory.Credentials.ClientCertificate.Certificate = clientX509Certificaat;
channelFactory.Credentials.ServiceCertificate.DefaultCertificate = serverX509Certificaat;
channelFactory.Endpoint.Contract.ProtectionLevel = ProtectionLevel.Sign;

type client = channelFactory.CreateChannel();
client.request();

我的JSFiddle:

http://jsfiddle.net/onlinepch/w7v6L578/

0 个答案:

没有答案