Terrorist attacks on Christian Democratic targets in Naples and Genoa marked the official opening today of the campaign for national elections June 3 and 4.

There were no casualties in today's attacks, which followed yesterday's raid on the Rome headquarters of Christian Democratic Party in which one policeman was killed and two others were seriously wounded.

The Christian Democrats, who have headed every Italian government since 1945, are expected to make slight gains in the election. Their major opponent, the Communist Party, is expected to lose ground.

Political violence, however, dominated the campaign news.

"The Red Brigades Open Their Election Campaign," proclaimed the prestigious Milan daily Corriere della Serra in a banner headline referring to the terrorist group that kipnaped and killed former premier Aldo Moro last year.

A terrorist slogan, scrawled in red paint in the Rome headquarters and in a Christian Democratic office in Turin that was also attacked yesterday, read: "We will transform the fraudulent elections into a real class war."

In today's attacks, a terrorist group called Organized Communist Nuclei calimed responsibility for the firebombing of a Christian Democratic study center in Naples and the car of a Christian Democratic city council-woman was firebombed in Genoa.

In the coming election, 40.8 million Italians over the age of 18 will go to the polls to elect the 630 deputies and 315 senators who make up the parliament.

The last parliament was dissolved by President Sandro Pertini on April 2 when it became clear that Italy's parties were unable to form a new government to replace the Christian Democratic Cabinet that collapsed Jan. 31.

Surveys published in recent weeks have indicated that the Christian Democratic Party will increase the 38.8 percent of the vote that it won in 1976 to more than 40 percent.

The country's second largest party, the Communists, are expected to suffer modest losses, dropping from 34.4 percent of the vote to 31 or 32 percent, thus reversing their pattern of steady electoral gains for the first time in over 30 years.

The climate contrasts sharply with the mood of the preelection period three years ago. At that time, a Communist victory over the Christian Democrats seemed possible and many Italians thought their country was on the brink of profound politicial and social change.

The current outlook, reassuring to those who fear the implications of a steady Communist advance, does not mean that forming a government will be any easier than it has been in the past.

The government that resigned in late January fell when the Communists withdrew their essential parliamentary support because the government refused to give them Cabinet posts. At present the Communists give every indication of sticking to this hard line after the election, refusing to back a minority Christian Democratic government.

The forecast, then, is for long, drawn out negotiations after the election. Rather than provide indications that make governing this country easier, the elections are likely to further polarize it.