ਕਿਵੇਂ ਬਣਾਓ: ਸਰਚ ਬਟਨ
ਸਰਚ ਬਟਨ ਕਿਵੇਂ ਬਣਾਓ ਸਿੱਖੋ ਕਿਵੇਂ ਕ੍ਰਿਮਸ਼ ਕਰੋ ਕ੍ਰਿਮਸ਼ ਕਰੋ
ਪੂਰੀ ਚੌਕਸਾ:
ਸਭ ਚੌਕਸਾ ਫਾਰਮ ਵਿੱਚ ਸੈਂਟਰ ਕਰੋ:
ਸਰਚ ਬਟਨ ਕਿਵੇਂ ਬਣਾਓ
ਕਦਮ 1 - ਐੱਚਟੀਐੱਮਐੱਲ ਕ੍ਰਿਮਸ਼ ਕਰੋ:
<!-- ਲੋਡ ਆਇਕਾਨ ਲਾਇਬ੍ਰੇਰੀ --> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css"> <!-- ਫਾਰਮ --> <form class="example" action="action_page.php"> <input type="text" placeholder="Search.." name="search"> <button type="submit"><i class="fa fa-search"></i></button> </form>
ਕਦਮ 2 - ਸਕਰੀਨ ਕ੍ਰਿਮਸ਼ ਕਰੋ:
* { box-sizing: border-box; } /* ਸਰਚ ਫੀਲਡ ਦੀ ਸਟਾਈਲ ਸੈਟ ਕਰੋ */ form.example input[type=text] { padding: 10px; font-size: 17px; border: 1px solid grey; float: left; width: 80%; background: #f1f1f1; } /* ਸੰਭਾਲ ਬਟਨ ਦੀ ਸਟਾਈਲ ਸੈਟ ਕਰੋ */ form.example button { float: left; width: 20%; padding: 10px; background: #2196F3; color: white; font-size: 17px; border: 1px solid grey; border-left: none; /* ਦੋਵੇਂ ਹੱਥ ਬੰਦ ਕਰੋ */ cursor: pointer; } form.example button:hover { background: #0b7dda; } /* ਸਫਾਈ ਕਰੋ */ form.example::after { content: ""; clear: both; display: table; }