1. Using the Form form (perfect), add two input elements so there is no gap between the input field and the submission field

    Take the search area of Xiaomi Mall as an example:Copy the code

HTML structure:

CSS structure:

  1. Using div, add two SPAN tags, add input and button to span elements, use inline-block attributes (but there will be a gap between them)

    Take baidu News search area as an example:Copy the code

HTML structure:

CSS structure:

  1. The form, input, and Button tags are inline-block elements with a border and a gap

    Take baidu page search area as an example:

HTML structure:

CSS structure: