gpt4 book ai didi

html - 我的表单样式不匹配 - HTML 和 CSS

转载 作者:行者123 更新时间:2023-11-28 15:40:49 25 4
gpt4 key购买 nike

我一直在我的网站上工作,w/c 使用我可以使用的内置 html 编辑器,我正在尝试复制此页面上的表单样式:https://imsc.clickfunnels.com/auto-webinar-registration10074792

这是我目前在 JSFIDDLE 中的工作:https://jsfiddle.net/su5rr2nh/1/

但是我不确定为什么我无法获得准确的样式,包括文本框的高度、宽度和选择/下拉元素。如您所见,图像没有进入文本框,而且我的按钮看起来也不一样。

这是我的代码:

<div style="padding: 40px; background-color: rgba(243, 242, 242, 0.611765); border: 3px dashed rgba(0,0,0,0.7);">
<h1 style="font-size: 32px; text-align: center; font-weight: bold;">FREE BONUS!</h1>
<h4 style="font-size: 18px; color: rgba(47, 47, 47, 0.6); text-align: center;">Reserve your seat TODAY for this free training, and we will send you our <span style="font-weight: bold;">Amazon's Secret Business Cheatsheet</span> that will get you up and running in NO TIME!</h4>
<input id="name" style="border-radius: 5px !important; padding: 10px 90px; margin-top: 10px;" name="name" type="text" placeholder="Your Name.." />
<img src="http://beaminggeek.com/profitbuilder/wp-content/uploads/2017/02/name2.png"/>
<input id="email" style="border-radius: 5px !important; padding: 10px 90px; margin: 10px;" name="email" type="email" placeholder="Your Email.."/>
<img src="http://beaminggeek.com/profitbuilder/wp-content/uploads/2017/02/email2.png"/>
<select style="border-radius: 5px !important; padding: 10px 90px; margin: 10px;">
<option value="desired">Select Desired Date</option>
<option value="yesterday">Watch Yesterday's Broadcast Now</option>
<option value="feb8th">Wednesday, Feb 8th, 2017</option>
<option value="feb8th">Wednesday, Feb 8th, 2017</option>
</select>
<button style="padding: 13px 35px; margin-right: auto; margin-left: auto; color: #fff; font-weight: bold; display: inline-block; -ms-transform: all .2s ease-in-out; -webkit-transform: all .2s ease-in-out; transform: all .2s ease-in-out; text-align: center !important; text-decoration: none !important; background-color: #ea6645;">Register Your Spot Now! * seats are extremely limited *</button>

<p>* we will not spam, rent or sell your information *</p>
<p>Your Local Time: 4:18 PM</p>
</div>

我正在尽我最大的努力去复制每一种风格,但还没有到那一步。任何帮助检查我错过了什么?如果需要,请随意修改我的 jsfiddle。我只想复制它的样式。我已经使用了 chrome inspector 元素,但那里的代码太多了。

请帮忙。

最佳答案

更新和解释

//text-align: left; sets the text start at the left of the input.
//border: 1px solid rgba(0,0,0,0.2); sets a border with 1px solid design, in the color black, with an alpha value of 0.2
//box-shadow: 0 0 0 3px rgba(0,0,0,0.5); sets a shadow at the bottom of the input with 3px height and black color with an alpha value of 0.5
//background-color: #fff; sets the background of the input to white
//border-radius: 5px; rounds the corners of the input
//background-position: 96%; sets the background at 96% of the input. (allmost right)
//background-image: url(https://appassets1.clickfunnels.com/images/name2.png); sets the background to the image, that is found at the URL.
//background-repeat: no-repeat; sets the background to no repeat. Each background would repeat, until the end of the element. We only want the background once. so we dont to repeat it.
//appearance: none; some browsers let elements appear custom. we dont want it.
//padding: 12px 18px; to size up the input a bit. otherwise the text would hit top, left, bottom.
//font-size: 16px; sets the text size to 16px.
//width: calc(100% - 36px); calculates the with of the input. 100% for the whole area. -36px for the padding(18px) that we added to the right and left of the input.
<input type="text" placeholder="Enter Your Name..." name="name"  data-type="extra" style="text-align: left; border: 1px solid rgba(0,0,0,0.2); box-shadow: 0 0 0 3px rgba(0,0,0,0.05); background-color: #fff; border-radius: 5px; background-position: 96%; background-image: url(https://appassets1.clickfunnels.com/images/name2.png); background-repeat: no-repeat; appearance: none; padding: 12px 18px; font-size: 16px; width: calc(100% - 36px);">

关于html - 我的表单样式不匹配 - HTML 和 CSS,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42108216/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com